is_degree(0.5)
is_degree(c(0, 0.2, 1))
is_degree(c(0.5, NA), na_rm = TRUE) # TRUE
is_degree(c(0.5, NA), na_rm = FALSE) # FALSE
is_degree(c(-0.1, 0.5)) # FALSE
is_degree(numeric(0)) # FALSE
Run the code above in your browser using DataLab