rda.conversion.loadDataFile: Load data from RAW data file

Description Usage Arguments Details Value Examples

View source: R/rda_conversion.R

Description

A function that loads raw data from a CSV file to a local variable.

Usage

1
2
rda.conversion.loadDataFile(directory, file, header = T, sep = ",",
  dec = ".", quote = "\"")

Arguments

directory

The directory in which the target file is located.

file

The file that should be loaded by this function.

header

boolean specifying whether the to-read-CSV has a header row or not. Defaults to TRUE.

sep

Character specifying the chr separating two data entries. Defaults to ,.

dec

Character specifying the decimal split chr. Defaults to ..

quote

Set of quoting characters. Defaults to "".

Details

The function first checks the existance of the given directory and file. In case both exist, the specified file will be loaded considering the loading parameters header, sep, dec and quote.

Value

data.frame containing the data present in the specified file.

Examples

1
2
3
4
 # Assuming the existance of directory 'dir' and file 'data.csv':
 KaggleHouse:::rda.conversion.loadFile(
     'dir', 'data.csv', header = T, sep = ";", dec = ".", quote = '\"'
 )

MarcoNiemann/kaggle_house documentation built on May 7, 2019, 2:50 p.m.