Can the R ggplot package be used in the Open Source Code node for visualization purposes?
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.
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.
The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.