class_prototype_accessors: Prototype: get or set slots

Description Usage Arguments Value See Also

Description

Get or set the values stored in slots of an object of class Prototype.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
archetype(x)

enclosure(x)

constructor(x)

archetype(x) <- value

enclosure(x) <- value

constructor(x) <- value

## S4 method for signature 'Prototype'
archetype(x)

## S4 method for signature 'Prototype'
enclosure(x)

## S4 method for signature 'Prototype'
constructor(x)

## S4 replacement method for signature 'Prototype'
archetype(x) <- value

## S4 replacement method for signature 'Prototype'
enclosure(x) <- value

## S4 replacement method for signature 'Prototype'
constructor(x) <- value

Arguments

x

conceptually, any R object.

value

depends of the function used.

  • For archetype<-(), any R object.

  • For enclosure<-(), either NULL or an environment holding the definition of the archetype's class.

  • For constructor<-(), either NULL or a call that can be used to generate a new archetype.

Value

archetype() returns any R object, depending on what is stored in slot archetype.

enclosure() returns an environment, possibly a (package's) namespace.

constructor() returns an unevaluated call.

Functions archetype<-(), enclosure<-() and constructor<-() update x and return its updated version invisibly.

See Also

Other Prototype: Prototype-class, Prototype-validators, is_prototype()


jeanmathieupotvin/cargo documentation built on Oct. 27, 2020, 5:22 p.m.