tbl2darrays: Converts a dplyr tbl object to a pair of darrays in...

Description Usage Arguments Value Examples

Description

This requires distributedR and HPData and will attempt to load them. If Distributed R is not already running, it will start it. Internally, this function simply saves the tbl reference as a view in Vertica and then uses the Vertica Loader to move data into Distributed R, and then deletes the view from database. Note that if you do not use the Vertica Native Data Loader, your table must have a 'rowid' column for this to work (see ?HPdata::db2darrays for more information).

Usage

1
2
tbl2darrays(table, dsn, resp, pred, npartitions, verticaConnector = TRUE,
  loadPolicy = "local")

Arguments

table

The local R-variable name of the tbl_vertica object to be converted to darrays.

dsn

The name of the DSN as specified in the ODBC.INI file. If an ODBC connection is already active, then the DSN of that connection will be used. If not (JDBC is being used), this field will be required.

resp

the list of the column names corresponding to responses.

pred

this is an optional argument to specify list of the column names corresponding to predictors. If this argument is not specfied or is empty, the function will load all columns of the table or view excluding the column specified in resp argument.

npartitions

this optional argument specifies the desired number of splits (partitions) in the dobject.

verticaConnector

TRUE to use the Vertica Connector for Distributed R. If FALSE, your table must include a 'rowid' column. See the manual page for HPdata::db2darrays for more information.

loadPolicy

"local" or "uniform". Please see help doc for db2darrays in package HPdata. Please read the details for more information.

Value

Y : the darray of responses; X : the darray of predictors

Examples

1
2
3
4
## Not run: 
my_darrays <- tbl2darrays(my_table,resp=list("some_column"))

## End(Not run)

vertica/vertica.dplyr documentation built on May 3, 2019, 6:11 p.m.