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)

Arguments

data

A data frame or tibble containing a column ending with "_cv"

Value

The input data frame with an additional 'reliability' column

Details

The reliability is categorized as:

  • High: CV < 0.15

  • Medium: 0.15 <= CV < 0.30

  • Low: CV >= 0.30

Examples

# 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()