I have a vector with mortality rates and I am trying to convert rates to probabilities.
I use this code:
v_p_HDage <- rate_to_prob(v_r_HDage)
But I get an error: Error in -r : invalid argument to unary operator
Also tried v_p_HDage <- (1-exp(-v_r_HDage))
But I get the same error.
My data v_p_HDage as it appears in R
Any ideas? Something wrong with the data?