calculate_errors: Function to calculate errors for an aggregation.

View source: R/calculate_errors.R

calculate_errorsR Documentation

Function to calculate errors for an aggregation.

Description

Function to calculate errors for an aggregation.

Usage

calculate_errors(x, type = "se", level = NA)

Arguments

x

Numeric or date vector to be summarised.

type

Type of error to calculate, either "se", "ci", or "range".

level

When type is "ci", what confidence interval should be calculated. level can be 90, 95, 98, 99, or 99.9 (which represent percentage).

Value

Tibble.

Author(s)

Stuart K. Grange.

Examples


# Create a vector
x <- sample(c(1:500, NA))

# Calculate errors
calculate_errors(x)

# Calculate errors with confidence intervals
calculate_errors(x, type = "ci", level = 95)

# Calculate errors with ranges
calculate_errors(x, type = "range")


skgrange/threadr documentation built on April 15, 2024, 9:35 p.m.