Learn R Programming

eddington (version 4.2.0)

E_num: Get the Eddington number for cycling

Description

Gets the Eddington number for cycling. The Eddington Number for cycling, E, is the maximum number where a cyclist has ridden E miles on E distinct days.

Usage

E_num(rides)

Value

An integer which is the Eddington cycling number for the data provided.

Arguments

rides

A vector of mileage, where each element represents a single day.

Details

The Eddington Number for cycling is related to computing the rank of an integer partition, which is the same as computing the side length of its Durfee square. Another relevant application of this metric is computing the Hirsch index (tools:::Rd_expr_doi("10.1073/pnas.0507655102")) for publications.

This is not to be confused with the Eddington Number in astrophysics, \(N_{Edd}\), which represents the number of protons in the observable universe.

See Also

E_cum, E_next, E_req, E_sat

Examples

Run this code
# 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))

# Get the Eddington number
E_num(rides)

Run the code above in your browser using DataLab