Closed dakni closed 7 years ago
Thanks for this suggestion. I did feel it was awkward to be double-clicking to open the RStudio project.
So your comment prompted me to replace devtools::create()
with a more custom function: rrtools::use_compendium
. This new fn is a wrapper for devtools::create()
, but also detects if the user is using RStudio. If they are using RStudio, the fn starts the R project. If the user is not useing RStudio, then, the fn just sets the wd to the package dir, exactly as you suggest above. So I think https://github.com/benmarwick/rrtools/commit/f105bbed30146eec8561a7aed5837fb02ac3496a closes this. Let me know how it works for you.
a nice idea to use the rstudio api. I was not aware of it.
The functions works on my ESS-setup and the notice of the working directory change should be sufficient for the non-RStudio users.
Thanks.
Thanks for confirming. Yes, I agree that it's important to make this pkg work nicely for R users who do not use RStudio.
I ran into this issue because I am testing the "RStudio-free" Version of rrtools.
When calling
I receive this output
Besides all files are created as expected. Nice.
However, when calling
I receive this error
Why is it not possible to state the
pkg
path explicitly? My current attempts failed (I suspect a problem withBesides the "bug", I think this is a somewhat important issue because IMO it is not good to rely too much on the automagic of RStudio...in this case its automatic changing of the working directory when creating a package.
My workaround looks like this (ugly, I know...):