You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the description of the parameters of the function percentile are not coherent with the implementation. In particular, the percent argument is not expressed in terms of probability but percentile (0 to 100). See the example below. In the case of the value argument, it only works if also the percent argument is included.
In my opinion, based on the current implementation if you define both as percentiles, in the range 0-100, and modify the description accordingly, the problem would be solved.
Best regards
#' @title Percentile
#' @description Calculate the value of a given probability value or the other way around.
#' @param var Vector
#' @param percent Number between 0 and 1 to calculate the value of a given probability.
#' @param value Number of the value for which the probability is going to be calculated.
percentile(c(1:10), percent = c(1/3,2/3))
0.3333333% 0.6666667%
1.03 1.06
percentile(c(1:10), percent = 100c(1/3,2/3))
33.33333% 66.66667%
4 7
percentile(c(1:10), percent = 100c(1/3,2/3), value = c(33,66))
33.33333% 66.66667%
4 7
Warning message:
In percentile(c(1:10), percent = 100 * c(1/3, 2/3), value = c(33, :
Values were given to both percentile and value... value will be ignored (set to NULL)
percentile(c(1:10), percent = c(1/3,2/3), value = c(33,66))
0.3333333% 0.6666667%
1.03 1.06
Warning message:
In percentile(c(1:10), percent = c(1/3, 2/3), value = c(33, 66)) :
Values were given to both percentile and value... value will be ignored (set to NULL)
The text was updated successfully, but these errors were encountered:
Dear Authors,
the description of the parameters of the function percentile are not coherent with the implementation. In particular, the percent argument is not expressed in terms of probability but percentile (0 to 100). See the example below. In the case of the value argument, it only works if also the percent argument is included.
In my opinion, based on the current implementation if you define both as percentiles, in the range 0-100, and modify the description accordingly, the problem would be solved.
Best regards
#' @title Percentile
#' @description Calculate the value of a given probability value or the other way around.
#' @param var Vector
#' @param percent Number between 0 and 1 to calculate the value of a given probability.
#' @param value Number of the value for which the probability is going to be calculated.
The text was updated successfully, but these errors were encountered: