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
would you mind providing the sample data?
- Cortana3 years agoHelper IV
As the data size is too big I was trying to share some sample data. But later I found that a small amount of data matched perfectly but the real data does not. Here you will get the real data. The size is about 70MB..
- lbendlin3 years agoSuper User
Your implementation of na.omit may lead to unintended side effects. As you specify it this will remove all rows where any of the columns is "NA"
Here is my result based on the data you provided. It has 3285939 rows but only 3117 rows will be left after the na.omit().
- Cortana3 years agoHelper IV
Yeah. It removes maximum rows, but my question is if I run the script in R and PBI separately, it gives me a different result. Shouldn't it be same?