Skip to content

Commit

Permalink
Vignettes
Browse files Browse the repository at this point in the history
  • Loading branch information
hmalmedal committed Oct 13, 2014
1 parent 1965fe0 commit 9f58aa6
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ Icon
.Rproj.user
.Rhistory
.RData
inst/doc
3 changes: 3 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ License: What license is it under?
LazyData: true
Imports: dplyr,
tidyr
Suggests: knitr,
ggplot2
VignetteBuilder: knitr
15 changes: 12 additions & 3 deletions R/makingtables.R → vignettes/makingtables.Rmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
#### Some example scripts of how to make League Tables from Raw Data

---
title: "Some example scripts of how to make League Tables from Raw Data"
author: "James Curley"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Some example scripts of how to make League Tables from Raw Data}
%\VignetteEngine{knitr::rmarkdown}
%\usepackage[utf8]{inputenc}
---

```{r}
df <- engsoccerdata2
Expand Down Expand Up @@ -72,4 +81,4 @@ mylist[[206]] #1964 tier 3
#### Note these tables obviously do not include point penalties
## e.g. 2010 tier 4 - Hereford were deducted 3 points for fielding an ineligible player.

```
17 changes: 12 additions & 5 deletions R/soccer code.R → vignettes/soccer_code.Rmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
#### Home goal differential per game compared to Away goal differential per game

---
title: "Home goal differential per game compared to Away goal differential per game"
author: "James Curley"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Home goal differential per game compared to Away goal differential per game}
%\VignetteEngine{knitr::rmarkdown}
%\usepackage[utf8]{inputenc}
---

```{r}
df<-read.csv("engsoccerdata.csv") #contains results/goals scored/conceded for all top 4 tier games 1888-2014
teams<-read.csv("engsoccerteams.csv") #contains data on teams and if in league 2013-4.
Expand Down Expand Up @@ -70,6 +79,4 @@ p
#couple of ways to sort table
tempdf %>% arrange(desc(GDaway.pg))
tempdf %>% arrange(GDhome.pg)



```

0 comments on commit 9f58aa6

Please sign in to comment.