Learn R Programming

FREddyPro (version 1.0)

percentNA: Percent of NA values

Description

Gives a percent of NA values for a specific column in a data frame

Usage

percentNA(var)

Arguments

var
The variable to calculate the percentage of NAs

Examples

Run this code
## Load the data
data(fluxes)

## Calculate percentage of NAs in the CO2 flux before cleaning data
percentNA(fluxes$co2_flux)

## Clean data
fluxes=cleanFluxes(fluxes,sdCor=TRUE,sdTimes=3,timesList=3,distCor=TRUE,
                   thresholdList=list(H=c(-100,1000),LE=c(-100,1000)))	

## Calculate percentage of NAs after cleaning
percentNA(fluxes$co2_flux)

Run the code above in your browser using DataLab