Skip to content

Commit

Permalink
TST: Add R devel to build matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
sinhrks committed Nov 27, 2015
1 parent 7f06d89 commit 9072bfd
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 6 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
^\.Rproj\.user$
^\.travis\.yml$
^README\.rst$
^install_rdevel\.sh$
^vignettes/rsconnect/.*$
^\.httr-oauth$
^NEWS\.rst$
14 changes: 11 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ language: r
warnings_are_errors: true
sudo: required

env:
- GGPLOT=DEV
- GGPLOT=STD
matrix:
include:
- env: RVER=STD GGPLOT=DEV
- env: RVER=STD GGPLOT=STD
- env: RVER=DEV GGPLOT=STD

r_binary_packages:
- dplyr
- tidyr
- proto
- ggplot2
- testthat
- changepoint
Expand All @@ -29,6 +32,9 @@ r_github_packages:
- jimhester/covr

before_install:
- if [[ "$RVER" == "DEV" ]]; then
sh install_rdevel.sh;
fi
- echo "options(repos = c(CRAN='http://cran.rstudio.com'))" >> ~/.Rprofile
- if [[ "$GGPLOT" == "DEV" ]]; then
Rscript -e 'install.packages("devtools")';
Expand All @@ -39,3 +45,5 @@ before_install:

after_success:
- Rscript -e 'library(covr);coveralls()'
- R --version
- Rscript -e 'library("ggplot2"); packageVersion("ggplot2")'
6 changes: 4 additions & 2 deletions R/fortify_base.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,14 @@ autoplot.matrix <- function (object, original = NULL, geom = 'tile',
message <- paste0("Argument 'scale' is being deprecated. Use + operator to returned ggplot instance.")
warning(message, call. = FALSE)
}
ylim <- rev(levels(as.factor(gathered$Index)))
if (is.null(ylim)) {
ylim <- rev(levels(as.factor(gathered$Index)))
}
mapping <- ggplot2::aes_string(x = 'variable', y = 'Index', fill = 'value')
p <- ggplot2::ggplot(mapping = mapping) +
geom_factory(geom_tile, gathered, alpha = alpha) +
scale +
xlab('Columns') + ylab('Rows') + ylim(ylim)
xlab('Columns') + ylab('Rows')
} else if (geom == 'point') {
if (ncol(object) != 2) {
stop("Number of columns must be 2 to plot with 'geom = point'")
Expand Down
35 changes: 35 additions & 0 deletions install_rdevel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
sudo apt-get -y build-dep r-base;
sudo add-apt-repository -y ppa:ubuntu-lxc/buildd-backports;
sudo apt-get update;
sudo apt-get install -y curl libcurl4-openssl-dev;
# zlib
wget http://zlib.net/zlib-1.2.8.tar.gz;
tar zxf zlib-1.2.8.tar.gz;
cd zlib-1.2.8;
./configure;
make;
sudo make install;
cd ../
rm -rf zlib-1.2.8;
rm zlib-1.2.8.tar.gz;
# PCRE
# ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.gz;
# tar zxf pcre-8.38.tar.gz;
# cd pcre-8.38;
# ./configure;
# make;
# sudo make install;
# cd ../;
# rm pcre-8.38.tar.gz;
# rm -rf pcre-8.38;
# R-devel
wget --no-check-certificate https://stat.ethz.ch/R/daily/R-devel.tar.gz;
tar zxf R-devel.tar.gz;
cd R-devel;
./configure --with-x=no --without-system-pcre;
make;
sudo make install;
cd ../
rm -rf R-devel;
rm R-devel.tar.gz;
Rscript -e 'install.packages("ggfortify", dependencies=c("Depends", "Imports", "Suggests")';
2 changes: 1 addition & 1 deletion vignettes/plot_dist.Rmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Plotting Probability Distributions with ggplot2 and ggfortify"
output: pdf_document
output: html_document
---

<!--
Expand Down
1 change: 1 addition & 0 deletions vignettes/plot_pca.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,4 @@ Passing `shape = FALSE` makes plot without points. In this case, `label` is turn
```{r, message = FALSE}
autoplot(sammon(eurodist), shape = FALSE, label.colour = 'blue', label.size = 3)
```

0 comments on commit 9072bfd

Please sign in to comment.