readEuCodedFile: Read CCTV Inspection Data in EN13508-2 Format

View source: R/readEuCodedFile.R

readEuCodedFileR Documentation

Read CCTV Inspection Data in EN13508-2 Format

Description

Read CCTV inspection data from file coded according to EN13508-2

Usage

readEuCodedFile(
  input.file,
  encoding = "unknown",
  file.encoding = NULL,
  read.inspections = TRUE,
  name.convention = c("norm", "camel", "snake")[1L],
  simple.algorithm = TRUE,
  warn = TRUE,
  dbg = TRUE,
  check.encoding = TRUE,
  ...
)

Arguments

input.file

full path to text file containing CCTV inspection results in the format described in DIN EN 13508-2

encoding

default: "unknown", passed to readLines, see there.

file.encoding

Encoding to be assumed for the input.file. The default is NULL in which case the name of the encoding is read from the #A1 field of the input.file.

read.inspections

if TRUE, general inspection data (in #B-blocks) are read, otherwise skipped (use if function fails)

name.convention

one of c("norm", "camel", "snake") specifying the set of names used in the returned tables. "norm": as specified in the norm EN13508.2, "camel": CamelCase, "snake": snake_case

simple.algorithm

if TRUE (default), a simple (and faster) algorithm is used to extract the general information about the inspections from the #B-headers. It requires that all #B-headers have the same number and order of fields. If FALSE, another algorithm being able to treat differing #B-header rows is used.

warn

if TRUE, warnings are shown (e.g. if not all #A-header fields were found)

dbg

if TRUE, debug messages are shown, else not

check.encoding

logical indicating whether or not to check if the encoding string that is given in the #A1 header of the file is "known". The default is TRUE, i.e. the check is performed and an error is thrown if the encoding is not in the list of known encodings.

...

further arguments to be passed to kwb.en13508.2:::getObservationRecordsFromEuLines

Value

list with elements header.info, inspections, observations


KWB-R/kwb.en13508.2 documentation built on April 3, 2024, 9:47 a.m.