addS3Class | R Documentation |
Add a S3 class as first class to an object.
addS3Class(x, class = NULL)
x |
The object to add class. |
class |
The class to add. |
addS3Class add a S3 class to an object
The same object with the new class as first class
Marc Girondot marc.girondot@gmail.com
print.CF <- function(x) {cat("print.CF ", x)}
result <- "Je suis donc je pense"
result <- addS3Class(result, class="CF")
class(result)
print(result)
result <- addS3Class(result, class=c("ECF", "OCF"))
class(result)
print(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.