coerce: Coerce to a Multi-Header Data Frame

is.mlth.data.frameR Documentation

Coerce to a Multi-Header Data Frame

Description

Functions to check and coerce the object to a mlth.data.frame.

Usage

is.mlth.data.frame(x)

as.mlth.data.frame(x, row.names = NULL, ...)

## S3 method for class 'list'
as.mlth.data.frame(x, ...)

## Default S3 method:
as.mlth.data.frame(x, ...)

## S3 method for class 'data.frame'
as.mlth.data.frame(x, ...)

## S3 method for class 'matrix'
as.mlth.data.frame(x, ...)

## S3 method for class 'mlth.data.frame'
as.list(x)

Arguments

x

any R object

row.names

NULL or character or integer vector to be used as row names, must be of the same length as the variables.

...

other arguments passed mlth.data.frame.

Value

is.mlth.data.frame returns a multi-header data frame. as.mlth.data.frame returns TRUE if the object has "mlth.data.frame" within its classes and FALSE otherwise.

Examples

L <- list(
		X = c('A', 'B', 'C'),
		Y = list(
			       N = 1:3,
			       M = 4:6))

(A <- as.mlth.data.frame(L))
is.mlth.data.frame(A)


IvanVoronin/mlth.data.frame documentation built on Jan. 31, 2024, 10:13 a.m.