defCasTable: Create a CASTable Object for an Existing CAS Table

Description Usage Arguments Value Examples

View source: R/CAStab.R

Description

Creates a CASTable object to reference an existing in-memory table in CAS. You can use this function to reference tables that were loaded by other SAS products, other scripts, or from server-side loads with the cas.table.loadTable function.

Usage

1
2
defCasTable(conn, tablename, caslib = "", columns = "", where = "",
  orderby = list(), groupby = list(), gbmode = "")

Arguments

conn

A CAS object that represents a connection and session in CAS.

tablename

A character that specifies the in-memory table name. You can run the cas.table.tableInfo function to list the in-memory tables.

caslib

An optional character string that identifies the caslib for the in-memory table. Specify this parameter to override the active caslib.

columns

A list of column names.

where

A character string that specifies a filter for the rows to process. The filter uses syntax that is specific to SAS.

orderby

A list of column names. Rows are partitioned according to the columns in the groupby parameter and then ordered according to the values of the columns specified in this parameter.

groupby

A list of column names. If you specify this parameter when you load an in-memory table, then the table is partitioned by the columns. If you specify this parameter when running an action, then BY-groups are formed temporarily for the duration of the action.

gbmode

A character string. Values are NOSORT (default) or REDISTRIBUTE. See the CAS product documentation for more information.

Value

CASTable

Examples

1
2
3
4
5
6
7
8
## Not run: 
irisct <- as.casTable(s, iris, casOut="irisct")

# Create another CASTable instance to the same in-memory table,
# but specify that CAS actions are performed by groups of species.
irisct.grouped <- defCasTable(s, tablename="irisct", groupby=list("species"))

## End(Not run)

sassoftware/R-swat documentation built on Dec. 8, 2018, 1:20 a.m.