elrReadData: Read Data File

View source: R/elr_read_data.R

elrReadDataR Documentation

Read Data File

Description

Tries to determine the format of the data by the file ending and chooses the appropriate function to read data. Currently supports .csv, .dat, .txt, .sav, and .xpt and calls read.csv, read.csv2, read.table, read.spss, read.xport accordingly. The default values for arguments depend on the function used to read data.

Usage

elrReadData(
  file,
  name = NULL,
  header = "default",
  sep = "default",
  dec = "default",
  use.value.labels = "default",
  na.strings = "NA"
)

Arguments

file

Name of the file to read.

name

Pure file name (without path to file) to read. If file includes a lengthy path name with many special characters, specifying this argument in addition to file may help the function to find the file ending.

header

See read.table.

sep

See read.table.

dec

See read.table.

use.value.labels

See read.spss.

na.strings

See read.spss.

Value

Object of class "data.frame".


EffectLiteR documentation built on July 9, 2023, 7:02 p.m.