tbl_vars: Get the variable names or types for a RevScaleR data source

Description Usage Arguments Details Value See Also Examples

Description

Get the variable names or types for a RevScaleR data source

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## S3 method for class 'RxDataSource'
tbl_vars(x)

tbl_types(x)

## S4 method for signature 'tbl_xdf'
names(x)

## S4 replacement method for signature 'tbl_xdf,character'
names(x) <- value

## S4 replacement method for signature 'grouped_tbl_xdf,character'
names(x) <- value

Arguments

x

A data source object, or tbl wrapping the same.

Details

These are simple wrappers around the names and rxGetVarInfo functions. The names<- function allows renaming variables inside an Xdf file; however, the recommended method is to use the rename verb instead.

Value

For tbl_vars, a character vector of variable names; for tbl_types, a named vector giving the types of each variable.

See Also

tbl_vars in package dplyr, rxGetInfo, rxGetVarInfo

Examples

1
2
3
4
5
6
7
mtx <- as_xdf(mtcars, overwrite=TRUE)
names(mtx)
tbl_vars(mtx)
tbl_types(mtx)

names(mtx)[1] <- "mpg2"
names(mtx)

RevolutionAnalytics/dplyrXdf documentation built on June 3, 2019, 9:08 p.m.