| ranktable | R Documentation |
Convert rank tables (as generated by rrank(), for example) to
order tables like the formula 1 tables; and convert back. Print and
summary methods for rank tables are documented here. See also
ordertable.Rd.
ranktable_to_ordertable(xrank)
ordertable_to_ranktable(xorder)
wikitable_to_ranktable(wikitable, strict=FALSE)
## S3 method for class 'ranktable'
summary(object, ...)
ranktable_to_printable_object(x)
## S3 method for class 'ranktablesummary'
print(x,...)
x, xrank, object |
A rank table, an object with class
|
xorder, wikitable |
Order tables. Argument |
strict |
Controls for |
... |
Further arguments (currently ignored) |
Function ranktable_to_ordertable() is trivial;
ordertable_to_ranktable() less so. The prototype for order
tables would be skating_table.
Function ordertable_to_ranktable(x) checks for each column being
a permutation of seq_len(nrow(x)) and, if not, it stops. In
particular, DNF entries are out of scope. To convert order
tables such as F1_table_2017, which include DNF
entries, use wikitable_to_ranktable() or ordertable2supp()
to produce a likelihood function.
Function ranktable_to_printable_object() is a helper function
that coerces a ranktable object to a matrix that prints nicely.
The print method is discussed in
inst/ordertable_to_ranktable.Rmd.
An order table or rank table
Robin K. S. Hankin
rrank,
ordertable2supp
p <- (5:1)/15
names(p) <- letters[1:5]
xrank <- rrank(12,p,rnames=month.abb)
xorder <- ranktable_to_ordertable(xrank)
## Can convert back and forth:
identical(xrank,ordertable_to_ranktable(ranktable_to_ordertable(xrank)))
# maxp(ordertable2supp(xorder)) # should be close to p
ordertable_to_ranktable(skating_table)
# convert a rank table to a support function:
rank_likelihood(wikitable_to_ranktable(volvo_table))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.