---
title: "Race results from the twelfth edition of the
  round-the-world Volvo Ocean Race"
output: bookdown::html_document2
---

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

<p style="text-align: right;">
![](`r system.file("help/figures/hyper2.png", package = "hyper2")`){width=10%}
</p>


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}
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,equalvolvostrengths}
equalp.test(volvo)
```


## 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)


### 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")
```
