Introduction to R for SAS programmers


Sadchla Mascary, Stefan Thoma, Zelos Zhu, Thomas Neitmann




On this page you find the materials used in the workshop Introduction to R for SAS programmers taking place on January 17th, 2023. The recording of the workshop is available on the CDISC website.

The workshop provided an RStudio cloud work-space. To follow along on your local machine, create a new R-Project and paste / execute the following code-chunk in an R-Script or the R console. Executing the following chunk in R on your machine will create and populate a data folder in your current working directory.

# set paths and data names
external.path <- 

local.path <- ("data")
subdir <- file.path(local.path, "save_data")
files <- c(

# external files (with path)
urls <- file.path(external.path, paste(files, "raw=true", sep = "?"))
# local files (with path)
dest <- file.path(local.path, files)

# create data folder in wd
if (!file.exists(local.path)) {
  # subdirectory

# download files if needed
download.file(urls, destfile = dest)

Further material

You can’t get enough? Here is a resource to help transitioning from SAS to R.