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
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().
Cortana
3 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?