dfplus-function: Create a dfplus Object.

dfplusR Documentation

Create a dfplus Object.

Description

Create a dfplus object from two data frames, one for the slot data and one for the slot metadata.

Usage

dfplus(data, metadata, skip.deprecated=TRUE, ...)

Arguments

data

A data frame including the input data.

metadata

A data frame with information on variables stored in data (thus metadata).

skip.deprecated

A logical vector indicating whether deprecated variables should be skipped in the final object or not.

...

Further arguments passed to function as.Date.

Details

This function can be used in combination with read.table and similar ones in order to produce object of class dfplus from spreadsheets.

This function set the classes of columns in slot data using the information stored in metadata (column Type), in most of the cases using the function as. For character variables, the function paste will be used.

Variables indicated as class Date will be set using the function as.Date. The format should be than indicated in slot metadata, column Units.

For factors, levels should be included in slot metadata, column Values, where levels are separated by commas.

Value

An object of class dfplus.

Author(s)

Miguel Alvarez (malvarez@uni-bonn.de).

Examples

## Add example for this function

kamapu/dfplus documentation built on March 27, 2022, 4:10 a.m.