Description Arguments Value Examples
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.
path |
The path to the input file. |
delim_tuple |
The tuple deliminator. |
delim_field |
The field deliminator. |
A list of observations. Each observation is a named list of key/value pairs.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.