rxGetVarNames: Variable names for a data source or data frame

Description

Read the variable names for data source or data frame

Usage

  rxGetVarNames(data)

Arguments

data

an RxDataSource object, a character string specifying the .xdf file, or a data frame.

Details

If colInfo is used in the data source to specify new column names, these new names will be used in the return value.

Value

character vector containing the names of the variables in the data source or data frame.

Author(s)

Microsoft Corporation Microsoft Technical Support

See Also

rxGetVarInfo, rxSetVarInfo, rxDataStep, rxGetInfo.

Examples


 # Specify name and location of sample data file
 censusWorkers <- file.path(rxGetOption("sampleDataDir"), "CensusWorkers")

 # Get the variable names
 varNames <- rxGetVarNames(censusWorkers)

 # Print the variable names
 varNames