Learn R Programming

repijson (version 0.1.0)

dataFrameToAttributes: The general functions that are used in multiple sections of the epiJSON package

Description

The general functions that are used in multiple sections of the epiJSON package

Usage

dataFrameToAttributes(x)

Arguments

x
A dataframe

Value

result A list of attributes that comprise the dataframe Convert a dataframe to attributes

Examples

Run this code
dF<- data.frame(id=c("A","B","3D"),name=c("tom","andy","ellie"),
                dob=c("1984-03-14","1985-11-13","1987-06-16"),
                gender=as.factor(c("male","male","female")),
                rec1contact=c(2,1,5),
                rec1date=as.POSIXct(c("2014-12-28","2014-12-29","2015-01-03")),
                rec1risk=c("high","high","low"),
                rec1temp=c(39.5,41.3,41.8),
                rec2contact=as.integer(c(4,1,1)),
                rec2date=as.POSIXct(c("2015-01-02","2015-01-12","2015-01-09")),
                rec2risk=c("high","low","high"),
                logical=c(FALSE,TRUE,TRUE),
				   stringsAsFactors=FALSE)

repijson:::dataFrameToAttributes(dF)

Run the code above in your browser using DataLab