dfplus | R Documentation |
Create a dfplus
object from two data frames, one
for the slot data
and one for the slot metadata
.
dfplus(data, metadata, skip.deprecated=TRUE, ...)
data |
A data frame including the input data. |
metadata |
A data frame with information on variables stored in
|
skip.deprecated |
A logical vector indicating whether deprecated variables should be skipped in the final object or not. |
... |
Further arguments passed to function |
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.
An object of class dfplus
.
Miguel Alvarez (malvarez@uni-bonn.de).
## Add example for this function
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.