mirror of
https://github.com/msberends/AMR.git
synced 2025-07-13 01:12:08 +02:00
v1.2.0
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user