dreamRs / esquisse

RStudio add-in to make plots interactively with ggplot2
https://dreamrs.github.io/esquisse
Other
1.78k stars 232 forks source link

Include custom filters in code export #38

Closed parkinsonje closed 5 years ago

parkinsonje commented 5 years ago

Great package!

When I use a custom filter (e.g. remove a factor from the "Data" window), the change is reflected in the dynamic graph but it is not reflected in the code on export. It would be great if the exported code reproduced exactly the same graph as in the window.

John

pvictor commented 5 years ago

Thanks John! In next release I hope, i'm working on it.

Victor

parkinsonje commented 5 years ago

Awesome! Looking forward to it.

John

pvictor commented 5 years ago

Code for filters is now available above code for plot. Please install from GitHub to test before next CRAN release.

Victor

parkinsonje commented 5 years ago

Hi Victor,

Hmm...it seems not to be working after I installed the new version. Here's an example error and session info.

John

esquisse:::esquisser() Loading required package: shiny Warning: package ‘shiny’ was built under R version 3.5.3

Listening on http://127.0.0.1:5732 Warning: Error in : geom_histogram not found in ggplot2 171: stop 170: match_geom_args 169: renderPlot 167: func 127: drawPlot 113: 97: drawReactive 84: origRenderFunc 83: output$esquisse-plooooooot 3: shiny::runApp 2: runGadget 1: esquisse:::esquisser Warning: Error in : geom_boxplot not found in ggplot2 171: stop 170: match_geom_args 169: renderPlot 167: func 127: drawPlot 113: 97: drawReactive 84: origRenderFunc 83: output$esquisse-plooooooot 3: shiny::runApp 2: runGadget 1: esquisse:::esquisser

sessionInfo() R version 3.5.1 (2018-07-02) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C

[5] LC_TIME=English_United States.1252

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] shiny_1.3.2 bindrcpp_0.2.2 esquisse_0.1.9.900 reshape2_1.4.3 forcats_0.3.0 [6] stringr_1.4.0 dplyr_0.7.7 purrr_0.3.2 readr_1.1.1 tidyr_0.8.2 [11] tibble_2.1.1 ggplot2_3.1.1 tidyverse_1.2.1

loaded via a namespace (and not attached): [1] tidyselect_0.2.5 xfun_0.5 ggthemes_4.2.0 haven_2.1.0 lattice_0.20-38 [6] colorspace_1.4-1 generics_0.0.2 viridisLite_0.3.0 miniUI_0.1.1.1 htmltools_0.3.6 [11] yaml_2.2.0 rlang_0.3.4 later_0.8.0 pillar_1.4.1 glue_1.3.1 [16] withr_2.1.2 RColorBrewer_1.1-2 modelr_0.1.4 readxl_1.3.0 bindr_0.1.1 [21] plyr_1.8.4 munsell_0.5.0 gtable_0.3.0 cellranger_1.1.0 rvest_0.3.2 [26] knitr_1.21 httpuv_1.5.1 shinyWidgets_0.4.8 broom_0.5.1 Rcpp_1.0.1 [31] xtable_1.8-4 promises_1.0.1 scales_1.0.0 backports_1.1.4 jsonlite_1.6 [36] mime_0.6 hms_0.4.2 digest_0.6.19 stringi_1.4.3 grid_3.5.1 [41] cli_1.1.0 tools_3.5.1 magrittr_1.5 lazyeval_0.2.2 crayon_1.3.4 [46] pkgconfig_2.0.2 xml2_1.2.0 lubridate_1.7.4 assertthat_0.2.1 httr_1.4.0 [51] rstudioapi_0.10 R6_2.4.0 nlme_3.1-137 compiler_3.5.1

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

John E. Parkinson, Ph.D. Research Scientist

SECORE International 2103 Coral Way, 2nd Floor Miami, FL 33145

twitter: @secore_coral http://www.twitter.com/secore_coral website: www.secore.org email: j.parkinson@secore.org

Personal twitter: @parkinsonje http://www.twitter.com/parkinsonje website: www.thelifeaquatic.net http://thelifeaquatic.net/ email: jeverettparkinson@gmail.com

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

On Tue, Jun 4, 2019 at 5:48 AM Victor Perrier notifications@github.com wrote:

Code for filters is now available above code for plot. Please install from GitHub to test before next CRAN release.

Victor

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/dreamRs/esquisse/issues/38?email_source=notifications&email_token=AECJHHRL753YG232NRRCXO3PYY3AJA5CNFSM4GDJ4KI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW4BDUY#issuecomment-498602451, or mute the thread https://github.com/notifications/unsubscribe-auth/AECJHHSJV6C2QREYFCZY4YLPYY3AJANCNFSM4GDJ4KIQ .

pvictor commented 5 years ago

Hi John, Thanks for reporting that, should be fixed in last commit, if you can retry.

Function base::formals has a new argument in R 3.6.0 that isn't here in R 3.5.1, so thanks to your session info !!

Victor

parkinsonje commented 5 years ago

Awesome, thanks! Works perfectly now, including displaying the filter code. Great tool.

John

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

John E. Parkinson, Ph.D. Research Scientist

SECORE International 2103 Coral Way, 2nd Floor Miami, FL 33145

twitter: @secore_coral http://www.twitter.com/secore_coral website: www.secore.org email: j.parkinson@secore.org

Personal twitter: @parkinsonje http://www.twitter.com/parkinsonje website: www.thelifeaquatic.net http://thelifeaquatic.net/ email: jeverettparkinson@gmail.com

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

On Wed, Jun 5, 2019 at 3:22 PM Victor Perrier notifications@github.com wrote:

Hi John, Thanks for reporting that, should be fixed in last commit, if you can retry.

Function base::formals has a new argument in R 3.6.0 that isn't here in R 3.5.1, so thanks to your session info !!

Victor

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dreamRs/esquisse/issues/38?email_source=notifications&email_token=AECJHHWDQX72F2N7AP4EJ5TPZAHADA5CNFSM4GDJ4KI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXAX6ZA#issuecomment-499220324, or mute the thread https://github.com/notifications/unsubscribe-auth/AECJHHR5YMBU44CQVFJN2WLPZAHADANCNFSM4GDJ4KIQ .