Information on Data File Via a Data Handle

DESCRIPTION:

Gets variable names and type information from an external data set via an open data handle to the data.

USAGE:

getDataInfo(dh) 

REQUIRED ARGUMENTS:

dh
a data handle object. This is created with openData.

VALUE:

a list with four vectors, the first contains a single value and the next three are vectors of equal length:
nrows
the number of rows in the data set.
name
the names of the variables.
class
the class of each variable: "double", "character", or "factor".
keep
a logical vector with TRUE for those variables that will be included in the imported and FALSE for those variables that will be dropped.

DETAILS:

The length of the name, class , and keep vectors in the returned list is the number of variables (columns) in the external data set i.e. all variables are listed whether they are kept or dropped.

SEE ALSO:

, , .

EXAMPLES:

# First create an external data set: 
exportData(Quinidine, "Quinidine.ssd01")  # a SAS data set 
# Open the external data set for subsequent reads: 
dh <- openData("Quinidine.ssd01", rowsToRead=100, drop="Subject") 
# Get variable names and type: 
getDataInfo(dh) 
# Close the external data file: 
closeData(dh)