Forum Discussion
Cortana
3 years agoHelper IV
Same R scripts but different result on Power BI
I was trying to draw a correlation plot in powerBI using R scripts. But it is showing different results. Here is my R scripts code- library(corrplot)
A = cor(na.omit(dataset))
corrplot(A, met...
lbendlin
3 years agoSuper User
Not necessarily. Note this comment in the Power BI code window:
# 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(A, B, C, D, E, F, G, H, I)
# dataset <- unique(dataset)
Unless you also drop the index column and remove duplicates in your standard R script you are likely to get different results.
took me a couple tries but here you can see it gets the same result.