Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I'd like to create an R visual but Power BI can't seem to locate the ggplot2 package: "R script error. Error in library(ggplot2) : there is no package called 'ggplot2'". The ggplot2 is already installed and loaded in my R environment. In addition, my R home directory is set in Power BI and I've already created basic R plots that do not require additional packages. In the R script editor, I've also tried replacing "library(ggplot2)" with "library("ggplot2", lib.loc="C:/path-to-my-r-packages")" but no success so far. Any tips you have would be greatly appreciated!
Hi @heyydrien,
Maybe you can try to setting the full path of r script in options:
Regards,
Xiaoxin Sheng
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.