readDat: readDat

Description Usage Arguments Details Author(s) Examples

View source: R/dat.R

Description

Read a data loggger .dat file into a data-frame

Usage

1
2
3
4
readDat(fName, nRowsFileInfo = 1, nRowsColInfo = 2, 
    sep = ",", ..., colClasses = rep(NA, ncol(colInfo)), 
    colsTimeStamp = 1, formatTS = NULL, tz = "UTC", 
    na.strings = c("", "NA", "NAN", "\"NAN\""))

Arguments

fName

scalar string: file name or a connection, e.g. returned by unz

nRowsFileInfo

integer scalar: number of lines before column information

nRowsColInfo

integer vector: number of lines with column description

sep

column separator

...

further arguments to

colClasses

see link{read.table}

colsTimeStamp

integer vector: colums with time stamp column (will be set to POSIXct

formatTS

format string of the timestamp columns, see strptime, e.g.

tz

specify a time zone when converting to POSIXct, default: current local e.g CET, UTC

na.strings

Details

Assumes that there

Author(s)

Thomas Wutzler, Oscar Perez Priego

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
fName <- system.file("genData/chamberLoggerEx1_short.dat", package = "RespChamberProc")
if( nzchar(fName) ){
	ds <- readDat(fName)
}
# reading first from zipped file
fName <- system.file("genData/SMANIE_Chamber1_26032015.zip", package = "RespChamberProc")
if( nzchar(fName) ){
	ds <- readDat( unz(fName, file=unzip(fName, list=TRUE)[1,"Name"] )
			,tz="UTC")
}

RespChamberProc documentation built on May 2, 2019, 5:53 p.m.