readkvs: Read key/value pair observations.

Description Arguments Value Examples

View source: R/RcppExports.R

Description

Provides the workhorse function to read key/value pair observations from a flat file. Note that, same keys and corresponding values in the same observation are returned as vectors.

Arguments

path

The path to the input file.

delim_tuple

The tuple deliminator.

delim_field

The field deliminator.

Value

A list of observations. Each observation is a named list of key/value pairs.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
## Assume that we have a file at path "file.dat" with the
## following contents:
##
## key1=value11;key2=value12
## key1=value21;key2=value22
## key1=value31;key2=value320;key2=value321
##
## Let's read this in and display as a matrix:
observations <- readkvs("file.dat", ";", "=")
do.call(rbind, observations)

## End(Not run)

vst/rkvo documentation built on May 3, 2019, 7:09 p.m.