Compute a Cyclist's Eddington Number

Compute a cyclist's Eddington number, including efficiently computing cumulative E over a vector. A cyclist's Eddington number < https://en.wikipedia.org/wiki/Arthur_Eddington#Eddington_number_for_cycling> is the maximum number satisfying the condition such that a cyclist has ridden E miles or greater on E distinct days. The algorithm in this package is an improvement over the conventional approach because both summary statistics and cumulative statistics can be computed in linear time, since it does not require initial sorting of the data. These functions may also be used for computing h-indices for authors, a metric described by Hirsch (2005) . Both are specific applications of computing the side length of a Durfee square < https://en.wikipedia.org/wiki/Durfee_square>. Some additional author-level metrics such as g-index and i10-index are also included in the package.


eddington

CRAN_version Number_of_Downloads

One statistic that cyclists are known to track is their Eddington number. The Eddington number for cycling, E, is the maximum number where a cyclist has ridden E miles on E distinct days. So to get a number of 30, you need to have ridden 30 miles or more on 30 separate days.

This package provides functions to compute a cyclist’s Eddington number, including efficiently computing cumulative E over a vector. These functions may also be used for h-indices for authors. Both are specific applications of computing the side length of a Durfee square.

The package can also be used to ingest GPS Exchange Format (GPX) files into a data.frame format conducive to computing the Eddington number.

Installation

You can install the released version of eddington from CRAN with:

install.packages("eddington")

And the development version from GitHub with:

# install.packages("remotes")
remotes::install_github("pegeler/eddington2/R/package")

Example

Here is a basic example showing how to get the summary Eddington number of the included simulated rides dataset. Note that we first have to aggregate ride mileage by date.

library(eddington)
library(dplyr)

rides %>%
  group_by(ride_date) %>%
  summarize(n = n(), total = sum(ride_length)) %>% 
  summarize(E = E_num(total)) %>% 
  pull
#> [1] 29

See the package vignette for detailed usage.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("eddington")

4.3.0 by Paul Egeler, 6 months ago


https://github.com/pegeler/eddington2


Report a bug at https://github.com/pegeler/eddington2/issues


Browse source code at https://github.com/cran/eddington


Authors: Paul Egeler [aut, cre] , Tashi Reigle [ctb]


Documentation:   PDF Manual  


GPL (>= 2) license


Imports Rcpp, R6, methods, xml2

Suggests testthat, knitr, rmarkdown, stats, dplyr, tibble

Linking to Rcpp

System requirements: C++17


See at CRAN