Learn R Programming

healthcareai (version 1.2.4)

removeRowsWithNAInSpecCol: Remove rows where specified col is NA

Description

Remove rows from a data frame where a particular col is NA

Usage

removeRowsWithNAInSpecCol(df, desiredCol)

Arguments

df

A data frame to be altered

desiredCol

A column name in the df (in ticks)

Value

dfResult The input data frame with rows removed

References

http://healthcareai-r.readthedocs.io

See Also

healthcareai

Examples

Run this code
# NOT RUN {
df <- data.frame(a=c(1,2,3),b=c('Y','N',NA),c=c(NA,'Y','N'))
dfResult <- removeRowsWithNAInSpecCol(df,'b')
head(dfResult)
# }

Run the code above in your browser using DataLab