Description Usage Arguments Value Author(s) Examples
Add a new class name to the classes of an R object, and make it the first in the list of classes the objects belongs to.
1 | firstclass(x) <- value
|
x |
the object the new class is assigned to. Needs to be an object that can be copied. |
value |
character string with the new class name. |
The same object x, now belonging (additionally) to the
class given as "value"
.
Ute Hahn, ute@imf.au.dk
1 2 3 4 5 | x <- data.frame(u = 1:2, t = 3:4)
class(x)
firstclass(x) <- "my.first.class"
class(x)
firstclass(x) <- "data.frame"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.