BookmarkSubscribeRSS Feed

Asked & Answered: Can the R ggplot package be used for visualization purposes in Model Studio?

Started ‎04-03-2019 by
Modified ‎04-03-2019 by
Views 1,124

Question

 

97403_banner_Asked&Answered_aqua.pngCan the R ggplot package be used in the Open Source Code node for visualization purposes?

Answer

Yes, you can use the Open Source Code node in Model Studio to visualize plots using ggplot2 package in R software. Other Python or R visualization packages can also be used. The plots need to be saved as image files with rpt_ prefix and .png, .jpeg or .gif file extension. They will be displayed in the Results after the successful execution of the Open Source Code node.

 

Multiple visualizations using ggplot2 and rpart.plot packages are shown in this GitHub example.

 

Example on GitHub

 

gg_plots_rpart.png

 

Note that the above example requires pre-installation of rpart, rpart.plot and ggplot2 packages in R software on the Compute Server.

 

A special thanks to @MelodieRush for sharing similar example using SAS Enterprise Miner that led to this work.

Version history
Last update:
‎04-03-2019 08:44 AM
Updated by:

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags