Learn R Programming

HistDat (version 0.2.0)

Summary Statistics for Histogram/Count Data

Description

In some cases you will have data in a histogram format, where you have a vector of all possible observations, and a vector of how many times each observation appeared. You could expand this into a single 1D vector, but this may not be advisable if the counts are extremely large. 'HistDat' allows for the calculation of summary statistics without the need for expanding your data.

Copy Link

Version

Install

install.packages('HistDat')

Monthly Downloads

218

Version

0.2.0

License

GPL (>= 3)

Maintainer

Michael Milton

Last Published

April 6th, 2021

Functions in HistDat (0.2.0)

as.vector,HistDat-method

Converts this histogram to a vector. Not recommended if there are many counts as this would result in an incredibly long vector
length,HistDat-method

Calculates the total number of observations in a histogram dataset
HistDat-package

'HistDat': Summary statistics for histogram/count data
as.ecdf,HistDat-method

Converts this histogram to an instance of the "ecdf" class, allowing the calculation of cumulative densities, and quantiles
HistDat-class

S4 class for histogram data
HistDat

The constructor function for the HistDat class. This is the only official way to create an instance of this class.
as.ecdf

Converts an object to an empirical cumulative density function. This is a generic function.
c,HistDat-method

Concatenate observations into this instance
max,HistDat-method

Calculates the largest observation in the histogram dataset
mean,HistDat-method

Calculates the mean value of all observations in the histogram dataset
var,HistDat-method

Calculates the variance of observations in the histogram dataset
min,HistDat-method

Calculates the smallest observation in the histogram dataset
median,HistDat-method

Calculates the median value of the observations in the histogram dataset
sd,HistDat-method

Calculates the standard deviation of the observations in the histogram dataset
sort,HistDat-method

This is a dummy method so that sort can be applied to HistDat entries However it does nothing, because the values in a HistDat are sorted at the time of creation.
range,HistDat-method

Calculates the range of values of the observations in the histogram dataset
quantile,HistDat-method

Returns the empirical quantiles of the observations represented by this class
[,HistDat,ANY,ANY,ANY-method

Index the histogram data
sum,HistDat-method

Calculates the sum of all observations in the histogram dataset