Imports data data sets form external files into a data frame.
Currently supported files include: sav (SPSS), dta (Stata), xpt (SAS),
csv (comma-separated file), tab (tab-delimited file) and
txt (delimited text files). For SPSS, Stata and SAS it uses functions from
the foreign
package with some adjustments where necessary.
read.obs(file, convert.factors = TRUE, lab.factors = FALSE,
export.lab = FALSE, ...)
the name of the file (including extension) which the data are to be read from.
a logical value indicating whether variables with value labels in Stata and SPSS should be converted into R factors with those levels.
a logical value indicating whether variables with
complete value labels but imported using their numeric codes
(convert.factors = FALSE
) should be converted
from numeric to factor variables.
a logical variable indicating whether labels from SPSS or Stata should be exported to an external file.
additional parameters passed to read functions.
A data frame with an imported data set. For SPSS, Stata and SAS it has attributes with labels.