Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

as.etable

Convert data.frame/matrix to object of class 'etable'


Description

If x is data.frame then as.etable just adds etable to class attribute of x. If x is matrix then it will be converted to data.frame.

Usage

as.etable(x, rownames_as_row_labels = NULL)

is.etable(x)

Arguments

x

data.frame/matrix

rownames_as_row_labels

logical. If it is TRUE than rownames of x will be added to result as first column with name row_labels. By default row names will be added if they are not NULL and are not sequential numerics.

Value

object of class etable

Examples

data(mtcars)
etable_mtcars = as.etable(mtcars)
is.etable(etable_mtcars) #TRUE

etable_mtcars #another 'print' method is used

cor(mtcars) %>% as.etable()

expss

Tables, Labels and Some Useful Functions from Spreadsheets and 'SPSS' Statistics

v0.10.7
GPL (>= 2)
Authors
Gregory Demin [aut, cre], Sebastian Jeworutzki [ctb] (<https://orcid.org/0000-0002-2671-5253>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.