sum_fun: This is a summarize function, and return to into a tibble

View source: R/otherfunctions.R

sum_funR Documentation

This is a summarize function, and return to into a tibble

Description

  • Mode

  • Median

  • Arithmetic mean

  • Harmonic mean

  • Geometric mean

  • SD

  • SE

  • TODO: Generalized means, Interquartile mean,Pythagorean mean

Usage

sum_fun(x, na.rm = FALSE)

Arguments

x

A numeric vector

na.rm

If NA remove

Value

a tibble

Examples

a <- seq(1, 9, 2)
c <- rep(c(a, NA), 10)
d <- c(1, 2, 3, 3, 20, 31)
e <- c(NA, NA, NA, NA, 3, 3, 2)
f <- c(5, 10, 17, 24, 30)
e <- rnorm(1e4)
sum_fun(a)
sum_fun(c, na.rm = TRUE)
sum_fun(d)
sum_fun(e, na.rm = TRUE)
sum_fun(f)
sum_fun(e)

pedersebastian/pederlib documentation built on June 17, 2024, 2:37 p.m.