data <- tibble(
col_1 = c("a", "b", "c"),
col_2 = 1:3
)Welcome
This site contains a collection of Posit Recipes, short instructional guides with code snippets that demonstrate how to work with data in R. These recipes are focused on translating various tasks from SAS to R.
How to use this site
You can browse through recipes by the following topics:
Each recipe contains step-by-step instructions for a given data science task, followed by some example R code. Code is presented in code chunks with a grey background, e.g.
You can copy the contents of a code chunk by clicking the clipboard icon in the top right corner of the chunk.
SAS tip boxes
Each recipe features a tip box at the bottom with a side-by-side comparison of SAS and R code for a given task.
Look for these SAS tip boxes at the bottom of each recipe.
Search recipes
Use the Search bar on the left to look up certain topics. For example, to find recipes related to subsetting data, you can search the term “filter” or “subset”.
Resources
Check out the SAS to R cheatsheet and How to Learn R as a SAS User on the Posit blog for more tips and resources.