Description Usage Arguments Value See Also Examples
View source: R/create_stata_dta.R
Processes a list of data.frames and uses
write32.dta
to create Stata data sets, converting factor
and character vectors of each column of each dataset
1 2 3 |
df.list |
list of data frames from |
outdir |
directory to put Stata .dta files (default ".") |
date |
(character, default NULL) date of export, to be added to names of datasets |
lower.names |
(logical, default FALSE) should the column names for each variable be lowercase? |
tryConvert |
(logical, default TRUE) should the function try to make Date and numeric columns (TRUE) or just leave the data.frame as is (FALSE)? |
version |
(integer, default 11L) version of Stata to create,
passed to |
convert.dates |
(logical, default TRUE) convert the dates to
Stata dates? see |
convert.factors |
(character, default "string") how to handle
factors, see |
verbose |
(logical, default TRUE) should names be printed for checking the progress? |
trunc32 |
Truncate variables with > 32 characters? |
... |
Additional arguments to be passed to
|
data.frame with 2 columns: the dataset name and an indicator if that dataset was converted.
write32.dta
, write.dta
,
processVISION
1 2 3 4 5 6 7 8 9 | ## Not run:
xmlfile = "MISTIE_III_Subjects_2014_01_09.xml"
df <- processVISION(xmlfile, isXML=FALSE,
drop.pattern=c("^i_Doc_.*", "^docs_.*"),
drop.new=TRUE)
df.list <- df$df.list
check <- create_stata_dta(df.list, outdir=datadir)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.