-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsignifig.Rd
45 lines (39 loc) · 1.49 KB
/
signifig.Rd
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/signifig.R
\name{signifig}
\alias{signifig}
\title{Print significant figures}
\usage{
signifig(x, error, data, style = "pm", na.digit = 2, ...)
}
\arguments{
\item{x}{a numeric vector or data frame object containing the averaged
values.}
\item{error}{a numeric vector or data frame object containing the respective
error terms.}
\item{data}{a data frame containing the specified columns. If empty, \code{x}
and \code{error} need to be given as numeric vectors.}
\item{style}{a string specifying the output style to be used. The default
style \code{"pm"} reports the results as "3 ± 6", while \code{"par"} results
in outputs like "0.26 (0.02)". "siunitx" returns "0.26 (2)" which might be
used together with xtable for automated LaTeX table outputs.}
\item{na.digit}{an integer controlling to which significant digit the mean
value should be rounded if the error is zero or no error data was provided.}
\item{\dots}{arguments passed to \code{prettyNum}().}
}
\description{
This function reports the significant figures of a given \code{mean} together
with its respective \code{error} term (for instance confidence interval or
standard deviation).
}
\examples{
signifig(c(0.28, 5, -31.6, 2.6, 2, NA, 27.1),
c(0.688, 0.8, 11.6, 9.6, NA, 1.6, 0))
}
\references{
Taylor, J.R. (1997). \emph{Error analysis: the study of uncertainties in physical
measurements}. University Science Books, Sausalito, CA.
}
\author{
Zacharias Steinmetz
}