Substitute for rowSums(!is.na(data)) but it also checks if input is NULL or is a dataframe

n_complete_row(data)

Arguments

data

a dataframe

Value

numeric vector of the number of complete values in each row

See also

Examples

n_complete_row(airquality)
#> [1] 6 6 6 6 4 5 6 6 6 5 5 6 6 6 6 6 6 6 6 6 6 6 6 6 5 5 4 6 6 6 6 5 5 5 5 5 5 #> [38] 6 5 6 6 5 5 6 5 5 6 6 6 6 6 5 5 5 5 5 5 5 5 5 5 6 6 6 5 6 6 6 6 6 6 5 6 6 #> [75] 5 6 6 6 6 6 6 6 5 5 6 6 6 6 6 6 6 6 6 6 6 5 5 5 6 6 6 5 5 6 6 6 5 6 6 6 6 #> [112] 6 6 6 5 6 6 6 5 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 #> [149] 6 5 6 6 6