Read unique variable names from a LSD results file (no duplicates)

Share:

Description

This function reads the variable names (columns) from a LSD results file (.res). The names returned are converted to the original LSD names whenever possible and duplicates are removed.

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

Value

Returns a character vector containing the names of all unique variables contained in the selected results file.

Note

Not all names can be automatically reconverted to the original LSD names. The conversion may be incorrect if the original LSD variable is named in the format "X_...".

Author(s)

Marcelo C. Pereira

See Also

info.details.lsd, info.init.lsd info.dimensions.lsd

Examples

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

info.names.lsd("Sim1_1.res")

info.names.lsd("Sim1_2.res.gz")

# Restore working directory
setwd(currWD)