Background
I written an R package, and now a collaborator (recent CS grad who is new to R) is editing and refactoring the code. In the process, he is dividing up my functions into smaller, more generic functions.
What he is doing makes sense, but when I started with package.skeleton()
, I had one file per function. Now, he has added functions on which the primary function depends, but that may have limited use outside the function itself.
He suggests that all the functions go into a single file, but I am against that because it is easier to do version control when we work on different files.
I have since started using roxygen to document each function within the text.
Question
What is the recommended way to handle functions: clearly the helper functions should stay with the the main function, but to what extent do I need to document helper functions?
The @export
suggestion in the comments is helpful, but I am curious to know how others organize their code.