7 changed files with 33 additions and 25 deletions
@ -1,23 +1,5 @@ |
|||
language: c |
|||
# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r |
|||
|
|||
before_install: |
|||
- curl -OL http://raw.github.com/craigcitro/r-travis/master/scripts/travis-tool.sh |
|||
- chmod 755 ./travis-tool.sh |
|||
- ./travis-tool.sh bootstrap |
|||
|
|||
install: |
|||
- ./travis-tool.sh install_github plyr |
|||
- ./travis-tool.sh install_deps |
|||
|
|||
script: ./travis-tool.sh run_tests |
|||
|
|||
on_failure: |
|||
- ./travis-tool.sh dump_logs |
|||
|
|||
branches: |
|||
except: |
|||
- /-expt$/ |
|||
notifications: |
|||
email: |
|||
on_success: change |
|||
on_failure: change |
|||
language: R |
|||
sudo: false |
|||
cache: packages |
|||
|
@ -1,2 +1,4 @@ |
|||
library(testthat) |
|||
library(ggplot2) |
|||
|
|||
test_check("statebins") |
|||
|
@ -1,6 +1,26 @@ |
|||
context("basic functionality") |
|||
test_that("we can do something", { |
|||
|
|||
#expect_that(some_function(), is_a("data.frame")) |
|||
require(ggplot2) |
|||
|
|||
flu <- cdcfluview::ili_weekly_activity_indicators(2017) |
|||
|
|||
ggplot(flu, aes(state=statename, fill=activity_level)) + |
|||
geom_statebins() + |
|||
coord_equal() + |
|||
ggplot2::facet_wrap(~weekend) + |
|||
labs(title="2017-18 Flu Season ILI Activity Level") + |
|||
theme_statebins() -> gg |
|||
|
|||
gb <- ggplot_build(gg) |
|||
|
|||
data(USArrests) |
|||
|
|||
USArrests$state <- rownames(USArrests) |
|||
|
|||
statebins(USArrests, value_col="Assault", name = "Assault") + |
|||
theme_statebins(legend_position="right") -> gg |
|||
|
|||
gb <- ggplot_build(gg) |
|||
|
|||
}) |
|||
|
Loading…
Reference in new issue