reclass | R Documentation |
Adds a class to an x.
reclass(x, value)
reclass(x) <- value
x |
The x getting the new class |
value |
The new class |
Adds a class to an x by putting the new class at the front of the vector of classes for the x.
The original x with the class containing value
in addition to the previous class(es)
Jared P. Lander
theDF <- data.frame(A=1:10, B=1:10)
reclass(theDF) <- 'newclass'
class(theDF)
theDF <- reclass(theDF, 'another')
class(theDF)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.