add_reliability.Rd
This function adds a new column called 'reliability' to the input dataset based on the coefficient of variation (CV) values in a column ending with "_cv".
add_reliability(data)
The input data frame with an additional 'reliability' column
The reliability is categorized as:
High: CV < 0.15
Medium: 0.15 <= CV < 0.30
Low: CV >= 0.30
# Create a sample dataset
df <- data.frame(
location = c("A", "B", "C", "D"),
value_cv = c(0.05, 0.20, 0.35, NA)
)
# Add reliability column
result <- df |>
add_reliability()