CHAPTER 4

image

SAS to R to SAS

The aim of this chapter is to describe one method of passing SAS data from SAS to R, using R to produce a graph, and then passing that graph back to SAS for inclusion in an ODS document. The R programming language provides a wide range of graphical functionality, some of which is unavailable or time-consuming to achieve in SAS—either in SAS/GRAPH or ODS Graphics. The method described here makes this functionality available to SAS applications. You can also adapt these basic principles to create character-based reports using R for inclusion in SAS reports.

Software Environment

This chapter includes the following software ...

Get SAS Programming and Data Visualization Techniques: A Power User’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.