replaces Vectorize() by vapply() in all functions defined in R/conversionHelpers.R. The advantages of this procedure are:
Massive speedups for large vectors of p/z-values
Keeps the format, i.e. converting a matrix of p-values to z-values with a given alternative returns a matrix as well. If length(alternative) > 1 the function returns an array with an additional dimension. Before, the function just returned a 1D vector
Fixed behaviour in an edge case of ci2z
In expression z <- estimate / se we did not check whether se == 0. This led to z-values of Inf or -Inf. Now, this throws an error.
Moved input checks to their own functions. This throws more informative error messages than stopifnot(). For future work, this might also help to avoid double argument checking in other functions.
replaces Vectorize() by vapply() in all functions defined in R/conversionHelpers.R. The advantages of this procedure are:
Massive speedups for large vectors of p/z-values
Keeps the format, i.e. converting a matrix of p-values to z-values with a given alternative returns a matrix as well. If length(alternative) > 1 the function returns an array with an additional dimension. Before, the function just returned a 1D vector
Fixed behaviour in an edge case of ci2z
In expression z <- estimate / se we did not check whether se == 0. This led to z-values of Inf or -Inf. Now, this throws an error.
Moved input checks to their own functions. This throws more informative error messages than stopifnot(). For future work, this might also help to avoid double argument checking in other functions.
This PR contains the following changes:
alternative
returns a matrix as well. Iflength(alternative) > 1
the function returns an array with an additional dimension. Before, the function just returned a 1D vectorci2z
z <- estimate / se
we did not check whetherse == 0
. This led to z-values ofInf
or-Inf
. Now, this throws an error.stopifnot()
. For future work, this might also help to avoid double argument checking in other functions.