complete_cases | R Documentation |
Return completed cases of a data.frame
complete_cases(data, cols = NULL, invert = FALSE)
data |
A data.frame |
cols |
Colnames or numbers to remove |
invert |
Logical, if |
A data.frame
x <- data.frame(
a = 1:5,
b = c(1, NA, 3, 4, 5),
c = c(1, NA, NA, 4, 5)
)
complete_cases(x)
complete_cases(x, invert = TRUE) # returns the incomplete rows
complete_cases(x, "a")
complete_cases(x, "b")
complete_cases(x, "c")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.