info.init.lsd: Read initial conditions from a LSD results file

View source: R/info.R

info.init.lsdR Documentation

Read initial conditions from a LSD results file

Description

This function reads the initial condition values from a LSD results file (.res).

Usage

info.init.lsd( file )

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

Value

Returns a 1 line matrix containing the initial conditions (row 1) of all variables contained in the selected results file.

Note

The returned matrix contains all variables in the results file, even the ones that don't have an initial condition (indicated as NA). Only variables automatically initialized automatically by LSD in t = 1 are included here.

Author(s)

Marcelo C. Pereira

See Also

list.files.lsd() info.details.lsd(), info.names.lsd() info.dimensions.lsd()

Examples

# get the list of file names of example LSD results
files <- list.files.lsd( system.file( "extdata", package = "LSDinterface" ) )

# get initialization data from first and second files
init1 <- info.init.lsd( files[ 1 ] )
init1[ , 4 : 8 ]

init2 <- info.init.lsd( files[ 2 ] )
init2[ , 4 : 8 ]

LSDinterface documentation built on May 14, 2022, 1:05 a.m.