Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rg.remove.na

Remove NA


Description

Function to remove NAs from a vector and inform the user of how many.

Usage

rg.remove.na(xx)

Arguments

xx

vector

Details

The function counts the NAs in a vector and returns the number of NAs and the "new" vector.

Value

x

vector without the NAs

nna

number of NAs removed

Author(s)

References

C. Reimann, P. Filzmoser, R.G. Garrett, and R. Dutter: Statistical Data Analysis Explained. Applied Environmental Statistics with R. John Wiley and Sons, Chichester, 2008.

Examples

x<-rep(NA,10)
x[c(1,3,5,7,9)]<-10
rg.remove.na(x)

StatDA

Statistical Analysis for Environmental Data

v1.7.4
GPL (>= 3)
Authors
Peter Filzmoser
Initial release
2020-03-10

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.