| sas_to_r | R Documentation |
Converts table from current SAS session into a R data.frame.
sas_to_r(table_name, libref = "WORK")
table_name |
string; Name of table in SAS. |
libref |
string; Name of libref SAS table is stored within. |
SAS only has two data types (numeric and character). Data types are converted as follows:
numeric -> double
character -> character
numeric (datetime, timezones are lost) -> POSIXct
numeric (date) -> POSIXct
In the conversion process dates and datetimes are converted to local
time. If utilizing another timezone, use attr(date, "tzone") <- or
lubridate::with_tz() to convert back to the desired time zone.
data.frame of the specified SAS table.
sas_from_r()
sas_connect()
cars <- sas_to_r("cars", "sashelp")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.