errors: Set Measurement Errors on a Numeric Vector

Description Usage Arguments Details See Also Examples

View source: R/errors.R

Description

Set/retrieve measurement errors to/from numeric vectors.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
errors(x)

errors_max(x)

errors_min(x)

errors(x) <- value

set_errors(x, value = 0)

as.errors(x, value = 0)

Arguments

x

a numeric object, or object of class errors.

value

a numeric vector of length 1 or the same length as x.

Details

errors returns a vector of errors. errors_max (errors_min) returns the values plus (minus) the errors.

`errors<-` sets the error values (and converts x into an object of class errors). set_errors is a pipe-friendly version of `errors<-` and returns an object of class errors. as.errors is an alias for set_errors.

See Also

groupGeneric.errors, mean.errors. Extract.errors, c, rep, cbind.errors. format.errors, print.errors, plot.errors. as.data.frame.errors, as.matrix.errors, t.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
x = 1:3
class(x)
x
errors(x) <- 0.1
class(x)
x

(x <- set_errors(x, seq(0.1, 0.3, 0.1)))
errors_max(x)
errors_min(x)

errors documentation built on April 3, 2018, 5:03 p.m.