as.data.table.Composite_table: Convert a Composite Table to a data.table or data.frame

View source: R/Composite_table.R

as.data.table.Composite_tableR Documentation

Convert a Composite Table to a data.table or data.frame

Description

As a Composite_table already is a data.table this function does very little except stripping all additional attributes and classes, as well as offering you the option to prepend the multinames before the column names

Usage

## S3 method for class 'Composite_table'
as.data.table(x, keep.rownames = NULL, ..., multinames = TRUE, sep = ".")

## S3 method for class 'Composite_table'
as.data.frame(
  x,
  row.names = NULL,
  optional = FALSE,
  ...,
  multinames = TRUE,
  sep = "."
)

Arguments

x

a Composite_table

keep.rownames

ignored

...

ignored

multinames

logical. Whether to prepend multinames before the column names

sep

separator between multinames and individual column names

row.names

NULL or a character vector giving the row names for the data frame. Missing values are not allowed.

optional

logical. If TRUE, setting row names and converting column names (to syntactic names: see make.names) is optional. Note that all of R's base package as.data.frame() methods use optional only for column names treatment, basically with the meaning of data.frame(*, check.names = !optional). See also the make.names argument of the matrix method.

Value

a data.table or data.frame


tatoo documentation built on March 31, 2023, 8:16 p.m.