This function validates whether a numeric value is a valid proportion scalar (ranging from 0 to 1, inclusive).
Examples
validate_proportion(0.5) # TRUE
#> [1] TRUE
try(validate_proportion(1.2)) # Error
#> Error in validate_proportion(1.2) : Not a valid proportion