as.vector-HistDat-method: Converts this histogram to a vector. Not recommended if there...

Description Usage Arguments Value Examples

Description

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

Usage

1
2
## S4 method for signature 'HistDat'
as.vector(x)

Arguments

x

An instance of the class HistDat

Value

A vector with the same length as x, but as a 1-D vector with an element for each count in the counts vector. In other words, all length(x) observations will be represented as a single element instead of being just counted as in the original HistDat object.

Examples

1
2
hd <- HistDat(vals = 1:3, counts = c(1, 2, 1))
as.vector(hd) # returns 1 2 2 3

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