info.dimensions.lsd: Dimension information for a LSD results file

Description Usage Arguments Details Value Author(s) See Also Examples

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

1

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).

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).

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

Author(s)

Marcelo C. Pereira

See Also

info.details.lsd, info.names.lsd, info.init.lsd

Examples

1
2
3
4
5
6
7
8
9
# Save current work directory and change to the examples directory
currWD <- getwd()
setwd(system.file("extdata", package = "LSDinterface"))

info.dimensions.lsd("Sim1_1.res")
info.dimensions.lsd("Sim1_2.res.gz")

# Restore working directory
setwd(currWD)


Search within the LSDinterface package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.