with_attrs | R Documentation |
Append or replace attributes of any object in a pipeline-frindly way.
with_attrs(xx, rep.attrs = list(), app.attrs = list())
xx |
Object whose attributes to modify and then return the object |
rep.attrs |
Named list of attributes to create or replace |
app.attrs |
Named list of attributes to create or append to |
The object 'xx' with modified attributes
# Change an object's attribute
with_attrs(iris,list(class='list'))
# Create a new attribute for an object
foo <- with_attrs(LETTERS,list(comment='Hello world'))
comment(foo)
foo <- with_attrs(foo,rep='One more comment.')
comment(foo)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.