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

let user decide whether to open R file created with use_r #817

Closed
friep opened this issue Jul 8, 2019 · 1 comment
Closed

let user decide whether to open R file created with use_r #817

friep opened this issue Jul 8, 2019 · 1 comment
Labels
code 🖥️ R/, tests/ feature a feature request or enhancement help wanted ❤️ we'd love your help!

Comments

@friep
Copy link
Contributor

friep commented Jul 8, 2019

In use_test the user can specify the open argument to avoid opening the R files in the editor.
In use_r, this is not possible right now. I think for automation this would be a nice to have feature. Plus, it would increase consistency of the two functions that are quite similar.

    lapply(c("foo", "bar", "zett"), usethis::use_r) # opens windows in Rstudio
    lapply(c("foo", "bar", "zett"), usethis::use_test) # opens windows in Rstudio (because interactive()  is default)
    
    # don't open windows
    lapply(c("foo", "bar", "zett"), usethis::use_test, open = FALSE) # does not open windows
    lapply(c("foo", "bar", "zett"), usethis::use_r, open = FALSE) # <- open argument not availale -> error
@jennybc
Copy link
Member

jennybc commented Jul 9, 2019

I agree use_r() and use_test() should be consistent in this way. You are welcome to make a PR that adds the open argument to use_r() that works as it does for use_test().

@hadley hadley added code 🖥️ R/, tests/ feature a feature request or enhancement help wanted ❤️ we'd love your help! labels Oct 16, 2019
@hadley hadley closed this as completed in dd7e95d Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code 🖥️ R/, tests/ feature a feature request or enhancement help wanted ❤️ we'd love your help!
Projects
None yet
Development

No branches or pull requests

3 participants