check_missing_values | R Documentation |
This function checks for missing values in a specified column of a data frame. It returns TRUE if there are no missing values in the column, and FALSE otherwise.
check_missing_values(df, column)
df |
A data frame in which the column to be checked is located. |
column |
The name of the column to check for missing values, as a string. |
A boolean value; TRUE if the specified column has no missing values, FALSE if it does.
data <- data.frame(a = c(1, 2, NA, 4), b = c("A", "B", "C", "D"))
check_missing_values(data, "a") # returns TRUE
check_missing_values(data, "b") # returns FALSE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.