Skip to contents

Remove Rows That are NA in Given Column

Usage

removeRowsThatAreNaInColumn(data, column, dbg = TRUE)

Arguments

data

data frame

column

column name

dbg

it TRUE debug messages are shown

Value

data with rows removed that are NA in data[[column]]

Examples

df <- data.frame(a = c(1, NA, 3), b = c(11, 22, NA))
df
#>    a  b
#> 1  1 11
#> 2 NA 22
#> 3  3 NA

removeRowsThatAreNaInColumn(df, "a")
#> Removing 1 rows that are NA in column 'a' ... ok. (0.00s) 
removeRowsThatAreNaInColumn(df, "b")
#> Removing 1 rows that are NA in column 'b' ... ok. (0.00s)