File: mean_sd.Rd

package info (click to toggle)
r-cran-datawizard 1.0.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,300 kB
  • sloc: sh: 13; makefile: 2
file content (49 lines) | stat: -rw-r--r-- 1,077 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mean_sd.R
\name{mean_sd}
\alias{mean_sd}
\alias{median_mad}
\title{Summary Helpers}
\usage{
mean_sd(x, times = 1L, remove_na = TRUE, named = TRUE, ...)

median_mad(
  x,
  times = 1L,
  remove_na = TRUE,
  constant = 1.4826,
  named = TRUE,
  ...
)
}
\arguments{
\item{x}{A numeric vector (or one that can be coerced to one via
\code{as.numeric()}) to be summarized.}

\item{times}{How many SDs above and below the Mean (or MADs around the Median)}

\item{remove_na}{Logical. Should \code{NA} values be removed before computing (\code{TRUE})
or not (\code{FALSE}, default)?}

\item{named}{Should the vector be named?
(E.g., \code{c("-SD" = -1, Mean = 1, "+SD" = 2)}.)}

\item{...}{Not used.}

\item{constant}{scale factor.}
}
\value{
A (possibly named) numeric vector of length \code{2*times + 1} of SDs
below the mean, the mean, and SDs above the mean (or median and MAD).
}
\description{
Summary Helpers
}
\examples{
mean_sd(mtcars$mpg)

mean_sd(mtcars$mpg, times = 2L)

median_mad(mtcars$mpg)

}