Forum Discussion
eliasrs
6 years agoNew Member
R Script error in Power BI but not on RStudio
Hello all. Im trying to create an R Visual to plot a control chart within Power BI. The script has been validated and runs on Rstudio (launched from power BI) but when I run it in Power BI I get th...
- 6 years agoHi,
The dataset dataframe is created automatically by Power BI, thus you don't need the following line of code:
dataset <- data.frame(TestDate, Meas)
If you can share the data or the pbix, perhaps I could be more helpful.
webportal
6 years agoImpactful Individual
Hi,
The dataset dataframe is created automatically by Power BI, thus you don't need the following line of code:
dataset <- data.frame(TestDate, Meas)
If you can share the data or the pbix, perhaps I could be more helpful.
The dataset dataframe is created automatically by Power BI, thus you don't need the following line of code:
dataset <- data.frame(TestDate, Meas)
If you can share the data or the pbix, perhaps I could be more helpful.
eliasrs
6 years agoNew Member
Well, just commented the extra line idicated and it worked! this was the end script.
# The following code to create a dataframe and remove duplicated rows is always executed and acts as a preamble for your script:
dataset <- unique(dataset)
library(qcc)
newdata <- dataset[order(dataset$TestDate),]
x <- c(newdata$TestDate)
s <- c(newdata$Meas)
qcc(s, type="xbar.one",nsigmas=3, labels=x)
Thanks a lot.