Description Usage Arguments Functions Examples
These function make using pipe functions easier when altering an object.
1 2 3 4 5 6 7 | add_class(x, new)
set_class(x, new)
add_comment(x, new)
set_comment(x, new)
|
x |
object to alter |
new |
new characteristic |
set_class
: Overwrite the class
add_comment
: Add a comment
set_comment
: Overwrite the comment
1 2 3 4 5 6 7 8 9 10 11 12 13 | # set versions will replace anything already there.
a <- set_class(TRUE, 'example')
a <- set_comment(a, 'this is an example of setting a comment')
# Add version will add to `c()` anything there.
b <- add_class(a, 'ex123')
b <- add_comment(b, 'but you can also add more information')
class(a)
class(b)
comment(a)
comment(b)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.