S7_data | R Documentation |
When an S7 class inherits from an existing base type, it can be useful to work with the underlying object, i.e. the S7 object stripped of class and properties.
S7_data(object)
S7_data(object, check = TRUE) <- value
object |
An object from a S7 class |
check |
If |
value |
Object used to replace the underlying data. |
S7_data()
returns the data stored in the base object;
S7_data<-()
is called for its side-effects and returns object
invisibly.
Text <- new_class("Text", parent = class_character)
y <- Text(c(foo = "bar"))
y
S7_data(y)
S7_data(y) <- c("a", "b")
y
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.