Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running esquisser(my_data) in an R Notebook (with inline output) works, but shows traceback errors. #205

Open
orgadish opened this issue Feb 28, 2022 · 1 comment

Comments

@orgadish
Copy link

RStudio 2021.09.2 Build 382
R 4.1.2
esquisse 1.1.0

To reproduce:

  1. Start a new R notebook from RStudio.
  2. In any chunk run esquisse::esquisser(cars).
  3. Create a figure (e.g. speed in x and dist in y)
  4. Exit the GUI.

The chunk output shows the following:

Listening on http://127.0.0.1:7454

Error in get(GeomFun, envir = pkg_envir) : 
object 'GeomHistogram' not found

Error in get(GeomFun, envir = pkg_envir) : 
object 'GeomHistogram' not found

(Yes, it shows the error twice.)

I know this "bug" may be more about how RStudio is handling the output than esquisse directly, but in an issue handling readr behavior in notebook chunks, the solution was to add a check for the notebook environment (tidyverse/readr#793), e.g. below. Not sure if this can be applied in this case.

!isTRUE(getOption("rstudio.notebook.executing")) && # Not running in an RStudio notebook chunk
!isTRUE(getOption("knitr.in.progress")) # Not actively knitting a document
@orgadish
Copy link
Author

Having esquisse::esquisser(cars) in a chunk also seems to hang the knitting process. For now my recommendation to my students is to run the esquisse GUI via the Add-in or the console and leave it out of the notebook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant