You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A question (and perhaps something to mention or clarify in the tutorial?), is in R package development, is it standard/better practice to have one R file per function?
I know that it's possible to put more than one function within a file, and I do this for related functions. But, what is bets practice?
And, if you do have multiple functions within one file, how does this work with the usethis workflow (ie. to add a new function to an existing file, rather than creating a new one?).
Then, in terms of Jim's section on writing unit tests, if you do have more than one function with an R file, I'm assuming you would also have all the tests for the various functions within one file? Or, is this not suggested?
The text was updated successfully, but these errors were encountered:
Hi!
A question (and perhaps something to mention or clarify in the tutorial?), is in R package development, is it standard/better practice to have one R file per function?
I know that it's possible to put more than one function within a file, and I do this for related functions. But, what is bets practice?
And, if you do have multiple functions within one file, how does this work with the
usethis
workflow (ie. to add a new function to an existing file, rather than creating a new one?).Then, in terms of Jim's section on writing unit tests, if you do have more than one function with an R file, I'm assuming you would also have all the tests for the various functions within one file? Or, is this not suggested?
The text was updated successfully, but these errors were encountered: