Quantcast
Channel: Explain ggplot2 warning: "Removed k rows containing missing values" - Stack Overflow
Viewing all articles
Browse latest Browse all 8

Answer by ali for Explain ggplot2 warning: "Removed k rows containing missing values"

$
0
0

Another reason for that, is existence of NA's. Suppose your array name is arr. You can simply check if you have any NA's in your array by:

any(is.na(arr))

If the answer was TRUE, then you have to delete NA's as below:

arr = arr[-which(is.na(arr)]

Even without any(is.na(arr)), you can simply run the above command and R will remove any NA's that might have existed.


Viewing all articles
Browse latest Browse all 8

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>