readData: Read in a dataset

View source: R/readData.R

readDataR Documentation

Read in a dataset

Description

Read in a tab-delimited dataset that also has a description file available with column types.

Usage

readData(fileName, descName = NA, doRemove = TRUE, guessRows = NA)

Arguments

fileName

path to the tab-delimited data file.

descName

path to the description file (optional)

doRemove

removes PATIENT entries that start with !, DSP, TH or CC

guessRow

when no description file is given, how many rows should be used to guess the column type (default: 1000)

Details

The description file is a direct downlad from the BCOS table descritpions

If only the fileName is given, the function behaves like read_tsv from readr

Value

The dataset as a data frame.

Examples

## Not run: 
tutlom <- readData('../data/original/tutlom_20170531.txt','../data/original/desc_tutlom20170531.txt', TRUE)

## End(Not run)

smm52/timeBlocks documentation built on Nov. 27, 2022, 3:54 a.m.