as.data.frame.exdf | R Documentation |
Converts an exdf
object to a data frame by appending the units and
categories to the top of each column in the exdf
object's
main_data
data frame. Typically this function is used for displaying
the contents of an exdf
object; in fact, it is used internally by
View
, write.csv
, and other functions. The main_data
of an
exdf
object x
can be accessed directly (without including the
units and categories in the first row) via x[['main_data']]
as with any
other list element.
## S3 method for class 'exdf'
as.data.frame(x, ...)
x |
An |
... |
Unused. |
A data frame formed from x
.
exdf
simple_exdf <- exdf(data.frame(A = 1), data.frame(A = 'u'), data.frame(A = 'c'))
as.data.frame(simple_exdf) # Includes units and categories in the first rows
simple_exdf[['main_data']] # Just returns the main data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.