Learn R Programming

lmSupport (version 2.9.13)

dfReadDat: Opens a tab-delimited dat file with typical Curtin lab settings

Description

Opens a tab-delimited data file with standard Curtin lab format which include using a header and setting delimiter to tab and as.is=TRUE

If variable named SubID (default) or other text supplied by SubID variable exists in dat file, row names will be set with this variable and then variable is removed from new data frame.

Usage

dfReadDat(File, SubID = "SubID", SubIDDigits = NULL)

Arguments

File

File name for .dat file including extension

SubID

String to indicate name of SubID variable. Default is 'SubID'. If set to NULL, rownames will not be altered

SubIDDigits

Length of SubID rowname string. If NULL, will be set to max length in data

Value

returns a data frame

See Also

read.table(), read.delim(), write.table(), dfRownames()

Examples

Run this code
# NOT RUN {
##dfReadDat('Sample1.dat)   #not executable unless Sample1.dat exists in path
##dfReadDat('Sample2.dat, SubID = 'subnum')   #not executable unless Sample2.dat exists in path
# }

Run the code above in your browser using DataLab