1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-13 01:12:08 +02:00
This commit is contained in:
2020-05-28 16:48:55 +02:00
parent d9a4b0bcaf
commit b44e2c9202
82 changed files with 448 additions and 517 deletions

View File

@ -25,7 +25,6 @@
#' @inheritSection lifecycle Questioning lifecycle
#' @param x a vector of values, a [`matrix`] or a [`data.frame`]
#' @param na.rm a logical value indicating whether `NA` values should be stripped before the computation proceeds.
#' @exportMethod kurtosis
#' @seealso [skewness()]
#' @rdname kurtosis
#' @inheritSection AMR Read more on our website!
@ -34,7 +33,7 @@ kurtosis <- function(x, na.rm = FALSE) {
UseMethod("kurtosis")
}
#' @exportMethod kurtosis.default
#' @method kurtosis default
#' @rdname kurtosis
#' @export
kurtosis.default <- function(x, na.rm = FALSE) {
@ -47,14 +46,14 @@ kurtosis.default <- function(x, na.rm = FALSE) {
(base::sum((x - base::mean(x, na.rm = na.rm))^2, na.rm = na.rm)^2)
}
#' @exportMethod kurtosis.matrix
#' @method kurtosis matrix
#' @rdname kurtosis
#' @export
kurtosis.matrix <- function(x, na.rm = FALSE) {
base::apply(x, 2, kurtosis.default, na.rm = na.rm)
}
#' @exportMethod kurtosis.data.frame
#' @method kurtosis data.frame
#' @rdname kurtosis
#' @export
kurtosis.data.frame <- function(x, na.rm = FALSE) {