-
Notifications
You must be signed in to change notification settings - Fork 28
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
Failures when calling ggedit::ggedit() without attaching the package #17
Comments
it has to have an object to run on |
Does the documentation need to be adapted then? (I'm using the CRAN version, which is fairly recent, but I still may be missing a change.) |
its under heavy revision the last month (generalizing to support ggextensions). but the above should be the solution in the cran version |
this is the current documentation |
To recap: How do I need to change my original code: library(ggplot2)
p <- ggplot(mpg) + geom_bar(aes(x = class))
ggedit::ggedit(p) |
Depends:
R (>= 2.3.0),
ggplot2 (>= 2.2.0),
shinyBS,
shiny, library(ggplot2)
library(shinyBS)
p <- ggplot(mpg) + geom_bar(aes(x = class))
ggedit::ggedit(p) |
I don't think I should be attaching |
i tried moving it now from depends to imports and using importsFrom and it still is being persistent on needing I'll look into it a bit more later today. thank you for raising the issue. |
Thanks for your very prompt response! |
could it be that https://github.com/ebailey78/shinyBS/tree/shinyBS3/inst/www |
But then shinyBS should be able to do so without being attached. If you could pull together a reproducible example that shows how shinyBS fails if it's not attached, best without involving ggedit, this would help shinyBS maintainers to fix the problem. I assume you're importing shinyBS via |
using |
Yes, that should be sufficient to properly load it on time. @ebailey78: Any idea why we are required to attach shinyBS to run ggedit? |
i added a patch to get around shinyBS not loading. |
@jcheng5 maybe you know the answer to this question |
Sorry, I don't. I don't know anything about shinyBS. |
Oh, I do know. This is why: https://github.com/ebailey78/shinyBS/blob/c329f8ce43e44579cafbb16fc3109fb69d403e57/R/misc.R#L1-L6 One easy fix would be to change that from onAttach to onLoad. Possibly a better fix would be to stop using addResourcePath at all, and have the dependency objects point to their locations on disk. I wouldn't rule out there being a good reason why @ebailey78 did it this way, but it doesn't immediately occur to me what it is (less copying?). |
btw |
got around the problem in shinyBS by adding onLoad hooks closing |
The text was updated successfully, but these errors were encountered: