hrbrmstr / statebins

Alternative to choropleths of US States ala http://bit.ly/statebins
Other
123 stars 27 forks source link

Error in theme_bw #9

Closed btadams closed 6 years ago

btadams commented 6 years ago

I'm following the example on https://rud.is/b/2017/11/18/statebins-reimagined/

When I run the code

statebins(USArrests, value_col="Assault", name = "Assault") +

I get the error below

Error in theme_bw(base_family = base_family, base_size = base_size, base_line_size = base_line_size, : unused arguments (base_line_size = base_line_size, base_rect_size = base_rect_size)

devtools::session_info() Session info ------------------------------------------------------------------------ setting value
version R version 3.3.3 (2017-03-06) system x86_64, mingw32
ui RStudio (1.1.383)
language (EN)
collate English_United States.1252
tz America/New_York
date 2017-11-19

Packages ---------------------------------------------------------------------------- package version date source
colorspace 1.3-2 2016-12-14 CRAN (R 3.3.2)
devtools 1.12.0 2016-06-24 CRAN (R 3.3.2)
digest 0.6.10 2016-08-02 CRAN (R 3.3.2)
ggplot2 2.2.1 2016-12-30 CRAN (R 3.3.2)
gtable 0.2.0 2016-02-26 CRAN (R 3.3.1)
labeling 0.3 2014-08-23 CRAN (R 3.3.0)
lazyeval 0.2.0 2016-06-12 CRAN (R 3.3.2)
memoise 1.0.0 2016-01-29 CRAN (R 3.3.2)
munsell 0.4.3 2016-02-13 CRAN (R 3.3.1)
plyr 1.8.4 2016-06-08 CRAN (R 3.3.1)
RColorBrewer 1.1-2 2014-12-07 CRAN (R 3.3.0)
Rcpp 0.12.8 2016-11-17 CRAN (R 3.3.2)
rlang 0.1.4 2017-11-05 CRAN (R 3.3.3)
scales 0.5.0 2017-08-24 CRAN (R 3.3.3)
statebins
1.3.0 2017-11-19 Github (hrbrmstr/statebins@1d93f7a) tibble 1.3.4 2017-08-22 CRAN (R 3.3.3)
withr 1.0.2 2016-06-20 CRAN (R 3.3.2)
yaml 2.1.14 2016-11-12 CRAN (R 3.3.3)

hrbrmstr commented 6 years ago

Thx for posting this here!

I'm going to add a check for ggplot2 versions after the wedding today (so likely tomorrow). In the meantime, you can make a copy of the theme_statebins() code and remove the extra params or install the GH version of ggplo2.

On Sun, Nov 19, 2017 at 10:01 AM, btadams notifications@github.com wrote:

I'm following the example on https://rud.is/b/2017/11/18/ statebins-reimagined/

When I run the code

statebins(USArrests, value_col="Assault", name = "Assault") +

-

theme_statebins(legend_position="right")

I get the error below

Error in theme_bw(base_family = base_family, base_size = base_size, base_line_size = base_line_size, : unused arguments (base_line_size = base_line_size, base_rect_size = base_rect_size)

devtools::session_info() Session info ------------------------------------------------------------

setting value version R version 3.3.3 (2017-03-06) system x86_64, mingw32 ui RStudio (1.1.383) language (EN) collate English_United States.1252 tz America/New_York date 2017-11-19

Packages ------------------------------------------------------------

package version date source colorspace 1.3-2 2016-12-14 CRAN (R 3.3.2) devtools 1.12.0 2016-06-24 CRAN (R 3.3.2) digest 0.6.10 2016-08-02 CRAN (R 3.3.2) ggplot2 2.2.1 2016-12-30 CRAN (R 3.3.2) gtable 0.2.0 2016-02-26 CRAN (R 3.3.1) labeling 0.3 2014-08-23 CRAN (R 3.3.0) lazyeval 0.2.0 2016-06-12 CRAN (R 3.3.2) memoise 1.0.0 2016-01-29 CRAN (R 3.3.2) munsell 0.4.3 2016-02-13 CRAN (R 3.3.1) plyr 1.8.4 2016-06-08 CRAN (R 3.3.1) RColorBrewer 1.1-2 2014-12-07 CRAN (R 3.3.0) Rcpp 0.12.8 2016-11-17 CRAN (R 3.3.2) rlang 0.1.4 2017-11-05 CRAN (R 3.3.3) scales 0.5.0 2017-08-24 CRAN (R 3.3.3) statebins 1.3.0 2017-11-19 Github (1d93f7a https://github.com/hrbrmstr/statebins/commit/1d93f7a) tibble 1.3.4 2017-08-22 CRAN (R 3.3.3) withr 1.0.2 2016-06-20 CRAN (R 3.3.2) yaml 2.1.14 2016-11-12 CRAN (R 3.3.3)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hrbrmstr/statebins/issues/9, or mute the thread https://github.com/notifications/unsubscribe-auth/AAfHtsqiGA451quT-BP0YflkWwCHPMWrks5s4ELagaJpZM4QjaNd .

hrbrmstr commented 6 years ago

The latest push now has a test for which version of ggplot2 is used (kinda…it just tests to see if those params are avail). So you shld be able to run with the CRAN version of ggplot2.

Also, when you have a moment, pls make sure I got your details right in the DESCRIPTION.

Many thx for testing & feedback!

btadams commented 6 years ago

Thanks boB! I'll try it out tonight.

Brian Adams

Brian Adams btadams478@gmail.com 804-514-2184

On Mon, Nov 20, 2017 at 7:10 AM, boB Rudis notifications@github.com wrote:

The latest push now has a test for which version of ggplot2 is used (kinda…it just tests to see if those params are avail). So you shld be able to run with the CRAN version of ggplot2.

Also, when you have a moment, pls make sure I got your details right in the DESCRIPTION.

Many thx for testing & feedback!

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/hrbrmstr/statebins/issues/9#issuecomment-345690954, or mute the thread https://github.com/notifications/unsubscribe-auth/ABbpC_tjhqknyKTFoAnn8UbB8Gb3Zcn9ks5s4XpCgaJpZM4QjaNd .