attemptstable: Translate attempts tables to hyper3 support functions

attemptstableR Documentation

Translate attempts tables to hyper3 support functions

Description

Attempts tables

Usage

attemptstable2supp3(x, decreasing=TRUE, give.supp=TRUE, nothrow_loses=FALSE)
rattemptstable(ncompetitors=8, nthrows=6, prob=0.23)

Arguments

x

Data frame, see details

decreasing

Boolean, with TRUE meaning that the highest score wins [e.g. javelin distances] and FALSE meaning that the lowest score wins [e.g. times for a race]

give.supp

Boolean, return the support function or the order statistic

nothrow_loses

Boolean, should NA entries count as coming last (TRUE) or be ignored (FALSE)

ncompetitors, nthrows, prob

Parameters for rattemptstable()

Details

An attemptstable object is a data frame with each row being a competitor and each column being an attempt. The canonical example is javelin:

> javelin_table
          throw1 throw2 throw3 throw4 throw5 throw6
Chopra     87.03  87.58  76.79      X      X  84.24
Vadlejch   83.98      X      X  82.86  86.67      X
Vesely     79.73  80.30  85.44      X  84.98      X
Weber      85.30  77.90  78.00  83.10  85.15  75.72
Nadeem     82.40      X  84.62  82.91  81.98      X
Katkavets  82.49  81.03  83.71  79.24      X      X
Mardare    81.16  81.73  82.84  81.90  83.30  81.09
Etelatalo  78.43  76.59  83.28  79.20  79.99  83.05

No-throws are stored internally as NA entries [see, e.g., file inst/javelin.txt], but they are displayed as an X. The print method, by default, emboldens the best attempt by each competitor. This does not work in Rmarkdown documents; to suppress it, set option bold_personal_best to FALSE:

options("bold_personal_best" = FALSE)

To translate an attemptstable object to a hyper3 support function, use suppfun(); function attemptstable2supp3() is a low-level helper function.

File inst/javelin.Rmd shows a use-case for attemptstable2supp3().

Function rattemptstable() produces a random attemptstable object. The defaults give a table of the same size and same total number of no-throws as javelin_table.

Value

Returns a hyper3 object

Note

Compare argument nothrow_loses with argument uninformative of function ordertable2supp().

Argument nothrow_loses is Boolean, with default TRUE meaning to interpret NA (no-throw) entries as losing attempts, or alternatively to view as though they never happened and are thus uninformative. In contrast, argument uninformative of function ordertable2supp() gives a list of entry types that are interpreted as uninformative [the other entry types meaning “came last”]. A simple example is given in inst/javelin.Rmd.

Author(s)

Robin K. S. Hankin

See Also

ordertable2supp,javelin

Examples


jj <- javelin_table[1:3,]
jj
attemptstable2supp3(jj)


hyper2 documentation built on June 23, 2026, 5:07 p.m.