# Example dataset with mixed valid and invalid values
df <- data.frame(
station_name = c("A", "B", "C", "D", "E"),
value = c("3.4", "<0.2", "TRUE", "NA", "5e-3")
)
# Check for invalid (non-numeric / non-logical) entries
check_value_logical(df, return_df = TRUE)
# Example with all valid numeric and logical values
df_valid <- data.frame(value = c(1.2, 0, TRUE, FALSE, 3.5))
check_value_logical(df_valid)
Run the code above in your browser using DataLab