MyNixOS website logo
Description

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) <doi:10.1073/pnas.0507655102>. Both are specific applications of computing the side length of a Durfee square <https://en.wikipedia.org/wiki/Durfee_square>.

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 simulatedrides 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.

Metadata

Version

4.2.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows