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

Template for R #327

Open
c-martinez opened this issue May 7, 2024 · 3 comments
Open

Template for R #327

c-martinez opened this issue May 7, 2024 · 3 comments

Comments

@c-martinez
Copy link
Member

The Python chapter has a reference to our Python Template, as a way to start your project with the good practices we encourage everyone to use (license, testing, citation information, etc).

Talking to @PabRod, apparently in R-land, it is more common to use the usethis library. Instead of creating a template for R, it would make sense to have a few lines of R that serve the same purpose (start your project with good practices we encourage).

I guess it would look something like this:

library(usethis)
usethis::create_package()
usethis::use_readme_md()
usethis::use_apache_license()
usethis::use_testthat()
usethis::use_github_action()
usethis::use_citation()
usethis::use_cff()

Would more experienced R people be able to give their opinion?

@hechth
Copy link
Member

hechth commented May 9, 2024

usethis is really very useful and already does a lot of templetization for you, so you could technically write a small R script to which you pass some parameters, like the name of the package etc. and then just rune the usethis library to init most of the things :)

@egpbos
Copy link
Member

egpbos commented Jun 19, 2024

@maltelueken What do you think about this?

@maltelueken
Copy link
Member

I agree with the above! usethis is also what I would recommend to those who want to start a new R package. Having such a script (maybe publish it as a GitHub Gist?) would be a nice idea.

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

4 participants