NLeSC / guide

Software Development Guide
https://guide.esciencecenter.nl
Creative Commons Attribution 4.0 International
47 stars 30 forks source link

Template for R #327

Open c-martinez opened 6 months ago

c-martinez commented 6 months ago

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 commented 6 months ago

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 commented 5 months ago

@maltelueken What do you think about this?

maltelueken commented 5 months ago

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.

c-martinez commented 1 month ago

During the research software templates session in RSECon24, there were some comments about "other tools used in R instead of templates":

Are these equivalent? competitors? I take it our preferred / recommended way is to use usethis?

PabRod commented 1 month ago

Dear @c-martinez, here my answer:

So yes, usethis shall still be our focus.