as.data.frame-es4dataframe-method: convert es4dataframe back to data.frame

as.data.frame,es4dataframe-methodR Documentation

convert es4dataframe back to data.frame

Description

i use this to quickly grab the underlying data.frame mainly in order to pass it cleanly to S3 methods, but there are other applications.

Usage

## S4 method for signature 'es4dataframe'
as.data.frame(
  x,
  row.names = NULL,
  option = FALSE,
  ...,
  stringsAsFactors = FALSE
)

Arguments

x

an es4dataframe

row.names

defaults to NULL

option

boolean defaults to FALSE

...

all the other good stuff

stringsAsFactors

boolean defaults to FALSE because why would you want to do anything else? note that this is not the default behavior of an as.data.frame method.

Value

a dataframe

See Also

es4dataframe

Examples

df1 	<- data.frame(a = rnorm(10), b = rnorm(10))
dfx	<- es4dataframe(df1)
df2 	<- as.data.frame(dfx)
identical(df1, df2)

williamcioffi/sattagutils documentation built on June 3, 2022, 10:21 a.m.