Learn R Programming

exams.forge (version 1.0.10)

grouped_data: Central Tendency Measures' Computation of Grouped Data

Description

Computes mean, mode or quantile/median of grouped data.

Usage

grouped_data(x, n, compute = c("mean", "fine", "coarse"), tol = 1e-06)

grouped_stats(x, n, compute = c("mean", "fine", "coarse"), tol = 1e-06)

dgrouped(x, n, compute = c("mean", "fine", "coarse"), tol = 1e-06)

Value

A list with the class, result and a table.

Arguments

x

numeric: borders

n

numeric: absolute frequencies for each group

compute

numeric/character: coefficient to compute

tol

numeric: tolerance for numerical comparison

Examples

Run this code
x <- 1:4
n <- ddiscrete(runif(3))
grouped_data(x, n)

Run the code above in your browser using DataLab