Browsed by
Tag: complete.cases()

In R Studio, how to exclude missing value (NA)?

In R Studio, how to exclude missing value (NA)?

I’ll create one data. In genotype D, yield data was missed, so it was indicated as NA. Now I’ll calculate the mean of total yield across all genotypes. As you see above, we can’t calculate the mean dud to NA. To obtain the mean of total yield, we should exclude NA. Using subset(), we can simply exclude Genotype D, But, a much simpler way is to use the code na.rm=TRUE, which enables you to avoid using subset(). When the data…

Read More Read More