---
title: "Race results from the twelfth edition of the
  round-the-world Volvo Ocean Race"
author: "Robin K. S. Hankin"
output: bookdown::html_document2
bibliography: hyper2.bib  # copy vignettes/hyper2.bib to inst/
---

```{r setup, include=FALSE}
set.seed(0)
knitr::opts_chunk$set(echo = TRUE)
library("hyper2")
library("magrittr")
options("digits" = 5)
```

```{r out.width='20%', out.extra='style="float:right; padding:10px"',echo=FALSE}
knitr::include_graphics(system.file("help/figures/hyper2.png", package = "hyper2"))
```

To cite the `hyper2` package in publications, please use @hankin2017_rmd.
This short document creates the `volvo` suite of R objects and
presents some preliminary analysis.  It refers to the 12th edition of
the Volvo Ocean Race, 2014-2015 in which seven racing teams competed
over nine legs.  Dataset taken from the wikipedia page (see references
below).

```{r readvolvotable}
volvo_table <- read.table("volvo.txt")
volvo_table
```

Thus the first column refers to leg 1, in which competitor Abu Dhabi
came first, Brunel third, and so on.  Here, `DNF` signifies "did not
finish" and `DNS` "did not start".  We can convert the table to a
support function with `ordertable2supp()`, remembering to specify the
noscore options:

```{r specifynoscore,cache=TRUE}
volvo <- ordertable2supp(volvo_table,noscore=c("DNF","DNS"))
(volvo_maxp <- maxp(volvo))
```

```{r volvomaxp, fig.cap="Pie chart of competitors' strengths"}
pie(volvo_maxp)
```

Figure \@ref(fig:volvomaxp) shows the maximum likelihood strengths
visually, and we may assess the null of equal strengths:

```{r,label=equalvolvostrengths,cache=TRUE}
equalp.test(volvo)
```


### Package dataset {-}

Following lines create `volvo.rda`, residing in the `data/` directory of the package.

```{r,label=savecurlingdataset}
save(volvo_table,volvo_maxp,volvo,file="volvo.rda")
```


## References {-}

Wikipedia contributors, 2019.  "2014-2015 Volvo Ocean Race".
In _Wikipedia, the free encyclopedia_.  Retrieved 22:21, February
28, 2020.
(https://en.wikipedia.org/w/index.php?title=2014\%E2\%80\%932015_Volvo_Ocean_Race&oldid=914916131)


