name.check.lsd {LSDinterface} | R Documentation |
Check a set of LSD variables names against a LSD results file
Description
This function checks if all variable names in a set are valid for a LSD results file (.res). If no name is provided, the function returns all the valid unique variable names in the file.
Usage
name.check.lsd( file, col.names = NULL, check.names = TRUE )
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, |
col.names |
a vector of optional names for the variables. The default is to read all (unique) variable names. |
check.names |
logical. If |
Value
Returns a string vector containing the (original) valid variable names contained in the results file, using LSD/C++ naming conventions.
Author(s)
Marcelo C. Pereira
See Also
list.files.lsd()
info.names.lsd()
,
Examples
# get the list of file names of example LSD results
files <- list.files.lsd( system.file( "extdata", package = "LSDinterface" ) )
# check all variable names
name.check.lsd( files[ 1 ] )
# check just two names
name.check.lsd( files[ 2 ], col.names = c( "GDP", "_growth1" ) )