Description Usage Arguments Details Value Examples
Create a single matrix from data in separate (dated) files.
1 | matrixFromDatedFiles(fls, dir, filePat = "*", col = 1, ...)
|
fls |
Files (character) to process |
dir |
Directory (character) |
filePat |
File pattern (regexpr) |
col |
Column description (integer or character) |
... |
Additional arguments passed to |
This is a general-purpose function to parse dated files to a data matrix. There's nothing here about the file-naming convention; that's the responsibility of the caller. (Columns get labelled exactly like the input files). Missing data padded w/ 'NA'. Load data from columns in the dated files. Can either specify files directly or specify a directory 'dir' and file-pattern 'filePat' (regexpr). Column description 'col', which can be either an integer column index or a character which will be passed to grep to match a column header. Arguments like 'skip', 'header', 'sep' & 'stringsAsFactors' are passed to 'read.table'.
This is a general-purpose function to parse dated files to a data matrix. There's nothing here about the file-naming convention; that's the responsibility of the caller. (Columns get labelled exactly like the input files).
A matrix
1 2 3 4 | ## Not run:
dat <- matrixFromDatedFiles('data', 'dat*', sep=",", header=T)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.