info.dimensions.lsd: Dimension information for a LSD results file
Description
This function reads some dimension information from a LSD results file (.res): number of time steps, number of variables and the original column (variable) names.
Usage
info.dimensions.lsd( file )
Value
Returns a list containing two integer values and a character vector describing the selected results file.
tSteps
Number of time steps in file
nVars
Number of variables (including duplicated instances) in file
varNames
Names of variables (including duplicated instances) in file, after R name conversion
Arguments
file
the name of the LSD results file which the data are to be read from. If it does not contain an absolute path, the file name is relative to the current working directory, getwd(). Tilde-expansion is performed where supported. This can be a compressed file (see file) and must include the appropriated extension (usually .res or .res.gz).
Author
Marcelo C. Pereira
Details
The returned number of time steps does not include the initial value (t = 0) for lagged variables (the second line of a .res format file).
# get the list of file names of example LSD resultsfiles <- list.files.lsd( system.file( "extdata", package = "LSDinterface" ) )
# get dimensions from second fileinfo.dimensions.lsd( files[ 2 ] )