Learn R Programming

SciencesPo (version 1.3.5)

use: Attach exclusively various file formats

Description

This works rigorously as the epicalc's use function, though limited for the file formats it can read. Fundamentally, it replaces the command attach of R and save an object with extension .data, which becomes the default dataset. All other data.frames will be detached, by the time of using the use function, unless the argument clear = FALSE is specified.

Usage

use(file, data = .data, clear = TRUE, spss.missing = TRUE,
  tolower = TRUE)

Arguments

file
The name of the file which the data are to be read from.
data
The internal name after attaching the data file.
clear
If clear = TRUE, all attached data in the environment will be detached first.
spss.missing
Whether SPSS missing values should be replaced with NA; default is spss.missing = TRUE.
tolower
Whether variable names should be forced to lower case; default is tolower = TRUE.

encoding

UTF-8

Details

By using this attach version, the data becomes available globally usually positioned in the second place, search().

Examples

Run this code
use(ssex)

Run the code above in your browser using DataLab