View source: R/classes_get_set.R
classAttr | R Documentation |
a wrapper for attributes
which accesses and sets an object's attributes
with the exception of protected ones, currently: c("names", "comment", "dim", "dimnames", "row.names", "tsp")
classAttr(x)
classAttr(x) <- value
x |
an object |
value |
an appropriate named list of attributes, or NULL. |
asd
a <- list("a"=1,"b"=2,"c"=3)
attr(a, "foo") <- "bar"
#extracts as well names
attributes(a)
#extracts only foo
classAttr(a)
#overwrites only foo
classAttr(a) <- list("bar"="foo")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.