Forum Discussion

Pierrechapar's avatar
Pierrechapar
Frequent Visitor
4 years ago

R script visual not working in service

Hi,

 

I'm having an issue with a R script visual in power bi service. The script is pretty straight forward.

library("ggplot2")
library("forcats")
dataset$Tarifa <- factor(dataset$Tarifa, levels = c("A", "B", "C", "D","E"))
 
ggplot(dataset, # Draw barplot with grouping & stacking
aes(x = Año,
y = Value,
fill = Tarifa)) +
geom_bar(stat = "identity",
position = "stack") +
facet_grid(~ Month) 
 
The error I get in service is:

IF anyone could help me solve this, I would be gratefull, since I can't find any other ways to create a visual like this.

I'm a newbe in R script and this is my first interaction with R.

 

Thanks a million!

2 Replies