formula1: Formula 1 dataset

formula1R Documentation

Formula 1 dataset

Description

Race results from 2017 Formula One World Championship

Usage

data(formula1)
formula1_points_systems(top=11)

Arguments

top

Number of drivers to retain in formula1_points_systems()

Format

A hyper2 object that gives a likelihood function

Details

Object formula1 is a hyper2 object that gives a likelihood function for the strengths of the competitors of the 2017 Formula One (Drivers') World Championship. Object F1_table_2017 is an order table: a data frame with rows being drivers, columns being venues, and entries being places. Thus looking at the first row, first column we see that Hamilton placed second in Austria.

The package uses files like inst/formula1_2017.txt as primary sources. These are generally copied from wikipedia, converted into tab-separated clean seven bit ascii, and tidied up a little. I have removed diacritics from names, so we see “Raikkonen”, “Perez”, etc. Also where distinct drivers with the same surname compete, I have indicated this, e.g. schumacher_R is Ralf Schumacher, schumacher_M is Michael, and schumacher_Mick is Mick; the underscore device means that quoting should not be needed in R idiom. I have not been entirely consistent here, with Bruno Senna appearing as “Senna_B” and Nelson Piquet Junior appearing as “PiquetJ” [on the grounds that in these cases the fathers, being more eminent, should be the primary eponym] although this might change in the future.

Object F1_table_2017 is simply the first 20 columns of read.table(inst/formula1_2017.txt) and object F1_points_2017 is column 21. The likelihood function formula1 is ordertable2supp(F1_table_2017). The datasets in the package are derived from text files in the inst/ directory (e.g. formula1_2017.txt) by script file inst/f1points_Omaker.R. Executing this script creates files like formula1_results_2017.rda.

The text files can be converted directly into ranktable objects and support functions as follows:

a <- read.table("formula1_2022.txt",header=TRUE)
a <- a[,seq_len(ncol(a)-1)]  # strips out the points column
wikitable_to_ranktable(a)
ordertable2supp(a)

Function formula1_points_system() gives various possible points systems for the winner, second, third, etc, placing drivers.

The constructors' championship is discussed at constructor.Rd.

There is a large amount of documentation in the inst/ directory in the form of Rmd files.

References

“Wikipedia contributors”, 2017 Formula One World Championship—Wikipedia, The Free Encyclopedia, 2018. https://en.wikipedia.org/w/index.php?title=2017_Formula_One_World_Championship&oldid=839923210 [Online; accessed 14-May-2018]

See Also

ordertable2supp,constructor

Examples

summary(formula1)
## Not run: #Takes too long
dotchart(maxp(formula1))

## End(Not run)


hyper2 documentation built on June 22, 2024, 9:57 a.m.