readLogger_InSituInc_Aquatroll: Read File From InSituInc Aquatroll

View source: R/logger_Aquatroll.R

readLogger_InSituInc_AquatrollR Documentation

Read File From InSituInc Aquatroll

Description

Read File From InSituInc Aquatroll

Usage

readLogger_InSituInc_Aquatroll(
  csv,
  headerPattern = NULL,
  timestampFormat = c("%d.%m.%Y %H:%M:%S", "%d.%m.%Y%H:%M:%S"),
  tz = "Etc/GMT+1",
  maxRowToLookForHeader = 700,
  model = "",
  dbg = FALSE,
  fileEncoding = "latin1"
)

Arguments

csv

full path to logger file

headerPattern

pattern matching the header of the table. See source code for the default.

timestampFormat

vector of possible timestamp formats. See help for the default.

tz

time zone. default: "Etc/GMT+1"

maxRowToLookForHeader

number of first rows in the file to read in advance to look for the header line. Default: 700

model

model of the Aquatroll (either "" or "600")

dbg

if TRUE, debug messages are shown

fileEncoding

encoding of the input file. Default: "latin1"

Value

if model = "600" data frame with columns DateTime, Seconds, Temp, ActCond, SpecCond, TDS, Resis, WaterD, DOC, DOP, Tur, Sal otherwise data frame with columns DateTime, WaterTemp.C, SpecCond.uS

Examples

# set path to example file (contained in this package)
file_1 <- extdataFile("InSituInc/example_InSituInc_Aquatroll.csv")
file_2 <- extdataFile("InSituInc/example_InSituInc_Aquatroll_600.csv")

# let's have a look on the file structure (read first 75 lines)
writeLines(kwb.utils::readLinesWithEncoding(file_1, 75, fileEncoding = "latin1"))
  
# now read the file
x <- readLogger_InSituInc_Aquatroll(csv = file_1)
  
# show the first lines
head(x)
  
# Read a file of Aquatroll, model "600"
x600 <- readLogger_InSituInc_Aquatroll(csv = file_2, model = "600")
  
# show the first lines
head(x600)
  
# show the structure
str(x600)


KWB-R/kwb.logger documentation built on June 18, 2022, 1:49 a.m.