Learn R Programming

HistDat (version 0.2.0)

length,HistDat-method: Calculates the total number of observations in a histogram dataset

Description

Calculates the total number of observations in a histogram dataset

Usage

# S4 method for HistDat
length(x)

Arguments

x

An instance of the class HistDat

Value

A numeric of length 1, holding the number of observations in the dataset

Examples

Run this code
# NOT RUN {
hd <- HistDat(vals = 1:3, counts = c(1, 2, 1))
length(hd) # returns 4
# }

Run the code above in your browser using DataLab