sassoftware / R-swat

The SAS Scripting Wrapper for Analytics Transfer (SWAT) package is the R client to SAS Cloud Analytic Services (CAS). It allows users to execute CAS actions and process the results all from R.
Other
50 stars 22 forks source link

Problem running example #27

Closed fedeago closed 3 years ago

fedeago commented 3 years ago

Hi, thanks for your works connecting R and SAS.

I am tring to use this package running the example

   library(swat)
   swat::CAS('cloud.example.com', 8777, protocol='http', username='sasdemo', password='!s3cret')

but I recive the following error:

 Error in curl::curl_fetch_memory(url, handle = handle) : 
  Could not resolve host: cloud.example.com

plus to it when I call the swat library it tells me

NOTE: The extension module for using the CAS binary protocol can not be located.

do you know how could I solve this?

kesmit13 commented 3 years ago

This package requires a CAS server to connect to. The examples in the readme need to be modified to point to an existing CAS server deployment, so they won't work as written. You would need a server hostname, port, and account to connect.

As far as the extension module note, some platforms (currently linux-64, win-64, and ppc-linux-64) can use a C extension for faster communication with a CAS server. You need to install from one of the releases for those platforms to get this extension. Installing just the R source will only allow you to connect using the CAS REST API.