| read.EpiData | R Documentation |
Reads EpiData epx-files into a
data.frame or a list of data.frames.
read.EpiData(x, convert = "all")
x |
An epx-file created by EpiData. |
convert |
c("all", "none", "missings", "labels", "both") "missings" replaces defined missing values with NA; "labels" replaces value codes with value labels, "both" replaces missing values and value codes and "all" (default) also applies variable classes according to the field types defined in EpiData. |
By default, object classes of the variables will be set according to the field type defined in EpiData. Coded variables will be returned as factors with the value labels defined in EpiData. Values that are defined as missing values in EpiData will be set to NA.
All date and time fields are convertet using *Coordinated Usual Time (UTC)* as time zone argument as EpiData does not provide time zone information by default.
A simple data base will be returned as a data.frame. A relational
data base will be returned as a list of data.frames.
Study informations are stored as attributes(...)$study.info and variable
labels are stored as attributes(...)$variable.labels. For relational
data bases, key variables and parent data sets are stored as attributes(...)$info.relations.
# Read the example data set "marathon.epx"
# (The helper function epx.example is only needed to identify the path
# of the example file in the loaded package).
dat <- read.EpiData(epx.example("SomeFakeData.epx"))
dat
# Extract study information
attributes(dat)$study.info
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.