Learn R Programming

PhotoGEA (version 1.4.0)

as.data.frame.exdf: Convert an exdf object to a data frame

Description

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.

Usage

# S3 method for exdf
as.data.frame(x, ...)

Value

A data frame formed from x.

Arguments

x

An exdf object.

...

Unused.

See Also

exdf

Examples

Run this code
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

Run the code above in your browser using DataLab