# Randomly generate a set of 15 rides
rides <- rgamma(15, shape = 2, scale = 10)
# View the rides sorted in decreasing order
stats::setNames(sort(rides, decreasing = TRUE), seq_along(rides))
# Create the Eddington object
e <- Eddington$new(rides, store.cumulative = TRUE)
# Get the Eddington number
e$current
# Update with new data
e$update(rep(25, 10))
# See the new data
e$cumulative
Run the code above in your browser using DataLab