Skip to contents

Read logger file of flow meter TDS 100 by PCE Deutschland GmbH

Usage

readLogger_PCE_TDS100(txt, timeformat = .defaultTimeFormat("v3"))

Arguments

txt

full path to text file generated by logger

timeformat

Date and time format used in the file. Default: "%y-%m-%d %H:%M:%S"

Value

data frame with columns tstamp, flow, flowunit,

vel, velunit, UP, DN, Q. Duplicate lines are removed. The data frame has an attribute metadata containing the meta data of the file, as returned by .getMetadata

Examples

if (FALSE) {
# set path to example file (contained in this package)
file_1 <- extdataFile("PCE/example_PCE_TDS100.log")
file_2 <- extdataFile("PCE/example_PCE_TDS100_noMeta.log")

# read a file containing metadata
x1 <- readLogger_PCE_TDS100(file_1) # warnings about duplicate timestamps
  
# read a file not containing metadata
x2 <- readLogger_PCE_TDS100(file_2) # warning about missing meta data
  
# examine the structures of the results
str(x1)
str(x2)
  
# get meta data from attribute "metadata"
kwb.utils::getAttribute(x1, "metadata")
}