Skip to content

Commit

Permalink
don't run examples because they take too long for travis
Browse files Browse the repository at this point in the history
  • Loading branch information
arilamstein committed Apr 10, 2015
1 parent bf97c7a commit 5f8b7af
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
4 changes: 3 additions & 1 deletion R/zip_choropleth.R
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ ZipChoropleth = R6Class("ZipChoropleth",
#' @note Nationwide zip choropleths can take a few minutes to render.
#' It is much faster to view a subset of the country by selecting a zoom.
#' @examples
#' \dontrun{
#'
#' library(choroplethrZip)
#' data(df_pop_zip)
#'
Expand Down Expand Up @@ -167,7 +169,7 @@ ZipChoropleth = R6Class("ZipChoropleth",
#' # showing the entire country
#' # note: this takes a few minutes to run
#' zip_choropleth(df_pop_zip, title="2012 US ZCTA Population Estimates", legend="Population")
#'
#' }
#' @seealso \url{https://www.census.gov/geo/reference/zctas.html} for an explanation of ZCTAs and how they relate to US Zip Codes.
#' @export
#' @importFrom Hmisc cut2
Expand Down
12 changes: 7 additions & 5 deletions inst/tests/test-zip_choropleth.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ test_that("msa_zoom returns ggplot", {
legend="Population"), "ggplot")
})

test_that("full county zoom returns ggplot", {
data(df_pop_zip, package="choroplethrZip")
expect_is(zip_choropleth(df_pop_zip,
title="2012 USA\nZip Population Estimates",
legend="Population"), "ggplot")
# this test is important, but I think that it causes travis to fail because it can take a
# few minutes to run
#test_that("full county zoom returns ggplot", {
# data(df_pop_zip, package="choroplethrZip")
# expect_is(zip_choropleth(df_pop_zip,
# title="2012 USA\nZip Population Estimates",
# legend="Population"), "ggplot")
})
3 changes: 3 additions & 0 deletions man/zip_choropleth.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Nationwide zip choropleths can take a few minutes to render.
It is much faster to view a subset of the country by selecting a zoom.
}
\examples{
\dontrun{

library(choroplethrZip)
data(df_pop_zip)

Expand Down Expand Up @@ -79,6 +81,7 @@ zip_choropleth(df_pop_zip,
# note: this takes a few minutes to run
zip_choropleth(df_pop_zip, title="2012 US ZCTA Population Estimates", legend="Population")
}
}
\seealso{
\url{https://www.census.gov/geo/reference/zctas.html} for an explanation of ZCTAs and how they relate to US Zip Codes.
}
Expand Down

0 comments on commit 5f8b7af

Please sign in to comment.