This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
## | |
## --- New Zealand General Election Polling --- | |
## | |
## Plots polling data scraped from Wikipedia. | |
## | |
## - GAM - | |
## | |
## The smoothed curves are calculated using a generalised additive model (GAM). The | |
## smoothing parameter is estimated using cross-validation. This means that the curves |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#calculate Cummings et al (2008) _gsi_ - a meaure of the exlusivity of a | |
#predefiend group of leaves in a phylogenetic tree | |
#example | |
# | |
# tr <- rtree(10) | |
# grp <- paste("t", 1:5, sep="") | |
# gsi(tr, grp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x <- "\"Hello!\"" | |
x <- '"Hello!"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f <- function(v=1000000, x=9, y=1) list(x=x, y=y, z=(v + 1000*(v %% 10)) %% 30323) | |
g <- function(x, y, z, rc) { | |
x <- (171 * x) %% 30269 | |
y <- (172 * y) %% 30307 | |
z <- (170 * z) %% 30323 | |
rc <- ((10000 * x) %/% 30269) + ((10000 * y) %/% 30307) + ((10000 * x) %/% 30323) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BSA | |
W Under The Broadcastin Act 1989 | |
BROADCASTING STANDARDS Aumqmrv Between PETER GREEN | |
TE MANA WHANONGA KAIPAHO | |
Complainant | |
And MEDIAWORKS TV LTD | |
Broadcaster | |
Before | |
Peter Radich, Chair | |
Leigh Pearson |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Decision No. 2015-087 | |
Under The Broadcasting Act 1989 | |
Between PETER GREEN | |
Complainant | |
And MEDIAWORKS RADIO LTD | |
Broadcaster | |
Before | |
Peter Radich, Chair | |
Te Raumawhitu Kupenga | |
Paula Rose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
## | |
## --- New Zealand General Election Polling --- | |
## | |
## Plots polling data scraped from Wikipedia. | |
## | |
## - GAM - | |
## | |
## The smoothed curves are calculated using a generalised additive model (GAM). The | |
## smoothing parameter is estimated using cross-validation. This means that the curves |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
X <- data.frame(g=c('a', 'a', 'a', 'b', 'b', 'b'), x=c(1:3, 1:3), y=c(3,0,1,4,0,0)) | |
ggplot(X, aes(x, y, fill=g)) + geom_col(pos='dodge') | |
ggplot(subset(X, y!=0), aes(x, y, fill=g)) + geom_col(pos='dodge') |