Attempts tables

attemptstable2supp3(x, decreasing=TRUE, give.supp=TRUE, dnf.last=TRUE)

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

dnf.last

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

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      P  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
>

The print method, by default, bolds 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().

Value

Returns a hyper3 object

Author

Robin K. S. Hankin

Examples


jj <- javelin_table[1:3,]
jj
#> An attemptstable:
#>          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
attemptstable2supp3(jj)
#> log( (Chopra=1)^4 * (Chopra=3, Vadlejch=3, Vesely=2)^-1 * (Chopra=3,
#> Vadlejch=3, Vesely=3)^-1 * (Chopra=3, Vadlejch=3, Vesely=4)^-1 *
#> (Chopra=3, Vadlejch=4, Vesely=4)^-1 * (Chopra=3, Vadlejch=5,
#> Vesely=4)^-1 * (Chopra=4, Vadlejch=5, Vesely=4)^-1 * (Chopra=4,
#> Vadlejch=5, Vesely=5)^-1 * (Chopra=4, Vadlejch=5, Vesely=6)^-1 *
#> (Chopra=4, Vadlejch=6, Vesely=6)^-1 * (Chopra=5, Vadlejch=6,
#> Vesely=6)^-1 * (Chopra=6, Vadlejch=6, Vesely=6)^-1 * (Vadlejch=1)^3 *
#> (Vesely=1)^4)