fImport {Hmisc} | R Documentation |
fImport
Description
General File Import Using rio
Usage
fImport(
file,
format,
lowernames = c("not mixed", "no", "yes"),
und. = FALSE,
...
)
Arguments
file |
name of file to import, or full URL. |
format |
format of file to import, usually not needed. See |
lowernames |
defaults to changing variable names to all lower case unless the name as mixed upper and lower case, which results in keeping the original characters in the name. Set |
und. |
set to |
... |
more arguments to pass to |
Details
This is a front-end for the rio
package's import
function. fImport
includes options for setting variable names to lower case and to change underscores in names to periods. Variables on the imported data frame that have label
s are converted to Hmisc package labelled
class so that subsetting the data frame will preserve the labels.
Value
a data frame created by rio
, unless a rio
option is given to use another format
Author(s)
Frank Harrell
See Also
upData
, especially the moveUnits
option
Examples
## Not run:
# Get a Stata dataset
d <- fImport('http://www.principlesofeconometrics.com/stata/alcohol.dta')
contents(d)
## End(Not run)