swat: SWAT: SAS Wrapper for Analytics Transfer (SWAT)

Description Details Connect and start a session Run a simple action Upload a data.frame to a CASTable Load a CAS actionSet Useful links Action documentation Author(s)

Description

This package enables you to connect from R to a SAS Cloud Analytic Services host, run actions on in-memory tables, and work with the results of the actions.

Details

Depending on how you install the package, you might be able to use binary communication with CAS. This is more efficient for bandwidth, but requires that your R installation have access to a precompiled library (rswat.so or rswat.dll). An alternative is to communicate with the server using the REST interface of the server over HTTP. See the connection examples that follow.

The responses and results of the actions are returned as R objects.

Connect and start a session

1
2
3
  s  <- CAS('cloud.example.com', 5570)  # binary communication

  s2 <- CAS('cloud.example.com', 8777, protocol='https')

Run a simple action

1
2
3
4
   results <- runAction(s, "builtins.serverStatus")
   results$server
   nodes actions
 1     1      15

You can also run an action using the generated R function:

1
2
3
4
   results <- cas.builtins.serverStatus(s)
   results$server
   nodes actions
 1     1      15

Upload a data.frame to a CASTable

1
  irisct <- as.casTable(s, iris)

Load a CAS actionSet

1
  runAction(s, "builtins.loadActionSet", actionSet="regression")

Useful links

Action documentation

See the Actions and Action Sets by Name and Product

Author(s)

Maintainer: Jared Dean [email protected]

Authors:


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