Description Usage Arguments Details Value See Also Examples
Select columns in a data source
1 2 3 4 5 |
.data |
A data source. |
... |
Unquoted variables to select. |
.outFile |
Output format for the returned data. If not supplied, create an xdf tbl; if |
.rxArgs |
A list of RevoScaleR arguments. See |
All the special functions mentioned in the documentation for select will also work with dplyrXdf. Note that renaming a variable is not supported in dplyrXdf select. If you want to do this, follow the select with a rename; the latter is very fast, as it only modifies the metadata portion of an xdf file, not the data itself.
An object representing the transformed data. This depends on the .outFile argument: if missing, it will be an xdf tbl object; if NULL, a data frame; and if a filename, an Xdf data source referencing a file saved to that location.
select in package dplyr, subset
1 2 3 4 5 6 7 8 9 10 | mtx <- as_xdf(mtcars, overwrite=TRUE)
tbl <- select(mtx, mpg, cyl)
names(tbl)
# filter on rows and columns simultaneously with .rxArgs
tbl2 <- select(mtx, mpg, cyl, .rxArgs=list(rowSelection=am == 1 & vs == 1))
dim(tbl2)
# save to a persistent Xdf file
select(mtx, mpg, cyl, .outFile="mtcars_select.xdf")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.