Forum Discussion
Cortana
Helper IV
4 years agoSame 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
Super User
4 years agowould you mind providing the sample data?
- Cortana4 years ago
Helper 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..
- lbendlin4 years ago
Super 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().
- Cortana4 years ago
Helper 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?