Class representing a piece of code.

See also

Other Representations: File, Function, Repository

Methods


Method new()

Initializer method

Usage

Code$new(name, lines)

Arguments

name

(character)
Name of Code object.

lines

(character)
Vector of lines Code object.

Returns

invisible(self)


Method print()

Overload generic print, to print Code object.

Usage

Code$print(...)

Arguments

...

further arguments passed to or from other methods. See print.

Returns

([base]character)


Method getLines()

Get method for lines.

Usage

Code$getLines()

Returns

(character)
Vector of lines in the Code object.


Method getNLines()

Get method for number of lines.

Usage

Code$getNLines()

Returns

(numeric) Number of lines in the Code object.


Method getName()

Get method for Name.

Usage

Code$getName()

Returns

(character)
Name of the Code object.


Method clone()

The objects of this class are cloneable with this method.

Usage

Code$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.