inst/doc/histdat.R

## ---- include = FALSE---------------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

## ----setup--------------------------------------------------------------------
library(HistDat)

## -----------------------------------------------------------------------------
h = HistDat(
  vals = 1:4,
  counts = c(1e12, 2e12, 2e12, 1e12)
)

## -----------------------------------------------------------------------------
mean(h)
min(h)
length(h)
median(h)

## -----------------------------------------------------------------------------
h = HistDat(
  vals = 1:4,
  counts = c(1, 2, 2, 1)
)
as.vector(h)

Try the HistDat package in your browser

Any scripts or data that you put into this service are public.

HistDat documentation built on April 6, 2021, 9:08 a.m.