Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Maureen
Helper III
Helper III

R visual renders on one computer but not the other

I used R code to create a visual and it worked great (after some troubleshooting) on my laptop. But, I used it in my classroom desktop in a DataViz class I am teaching and I could not get it to render on the desktop.  I had R studio and all of the right packages downloaded in studio and set up the IDE under the R scripting settings.  The code begins to run and chugs for a while but then I get a generic unhelpful error.  Is there a way to find more about the error?  

My Rcode and error code are attached.  

# The following code to create a dataframe and remove duplicated rows is always executed and acts as a preamble for your script:

# dataset <- data.frame(AvgLoanAmt, purpose, Year)
# dataset <- unique(dataset)

# Paste or type your script code here:
attach(dataset)
library(dplyr)
library(ggplot2)
library(viridis)
library(hrbrthemes)
tmp <- dataset %>%
mutate(purpose2 = purpose)

tmp %>%
ggplot( aes(x=Year, y=AvgLoanAmt)) +
geom_line( data=tmp %>% dplyr::select(-purpose), aes(group=purpose2), color="grey", size=0.5, alpha=0.5) +
geom_line( aes(color=purpose), color="#69b3a2", size=1.2 )+
scale_color_viridis(discrete = TRUE) +
theme_ipsum() +
theme(
legend.position="none",
plot.title = element_text(size=14),
panel.grid = element_blank()
) +
ggtitle("Average Loan Amount by Loan Purpose") +
facet_wrap(~purpose)

pberror.PNG

3 REPLIES 3
v-yuta-msft
Community Support
Community Support

@Maureen ,

 

I'm not able to reproduce this error. I would suggest you create a support ticket here.

 

Regards,

Jimmy Tao

I posted this on in the Power BI community yesterday and it was recommended that I submit a support ticket.  When I went to the support link the only option it kept circling me back to was "suggest an idea" so this is where I am posting the issue again:  

 

I used R code to create a visual and it worked great (after some troubleshooting) on my laptop. But, I used it in my classroom desktop in a DataViz class I am teaching and I could not get it to render on the desktop.  I had R studio and all of the right packages downloaded in studio and set up the IDE under the R scripting settings.  The code begins to run and chugs for a while but then I get a generic unhelpful error.  Is there a way to find more about the error?  

My Rcode and error code are attached.  

# The following code to create a dataframe and remove duplicated rows is always executed and acts as a preamble for your script:

# dataset <- data.frame(AvgLoanAmt, purpose, Year)
# dataset <- unique(dataset)

# Paste or type your script code here:
attach(dataset)
library(dplyr)
library(ggplot2)
library(viridis)
library(hrbrthemes)
tmp <- dataset %>%
mutate(purpose2 = purpose)

tmp %>%
ggplot( aes(x=Year, y=AvgLoanAmt)) +
geom_line( data=tmp %>% dplyr::select(-purpose), aes(group=purpose2), color="grey", size=0.5, alpha=0.5) +
geom_line( aes(color=purpose), color="#69b3a2", size=1.2 )+
scale_color_viridis(discrete = TRUE) +
theme_ipsum() +
theme(
legend.position="none",
plot.title = element_text(size=14),
panel.grid = element_blank()
) +
ggtitle("Average Loan Amount by Loan Purpose") +
facet_wrap(~purpose)
 

R visual displays on one computer but not the other 

I am currently having the same issue. Scripted visuals will not work in Python, or R. I have reinstalled my Python and R and reinstalled all of my packages, but that didn't help. Let me know if you find a fix. It would be greatly appreciated. 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors