Function to count number of individual cases and blood counts.

count_cases(x)

count_cbc(x, columns = c("HGB", "MCV", "PLT", "RBC", "WBC"), complete = FALSE)

Arguments

x

data.table, in the format described in sbcdata.

columns

character, name of columns from sbcdata that should be treated as complete blood count (CBC).

complete

logical, if TRUE the CBC is only count if none of the columns is NA.

Value

integer, number of cases or blood counts

Author

Sebastian Gibb mail@sebastiangibb.de

Examples

count_cases(sbcdata)
#> [1] 913346
count_cbc(sbcdata)
#> [1] 2580217