Closed cosimameyer closed 1 year ago
Indeed I think this is a matter of taste. I personally like to keep functions of the same category within one file. There does not seem to be an agreed standard, but this is what the R packages book says:
I wrote a short description for the undocumented functions but since they are not exported, I kept it on the brief side.
Thanks for following up - I know there is some controversy about it and I'm fine with leaving it as it is (again, as I said, it's a matter of taste).
Coming from a user experience perspective when you often work with new packages on a debugging modus, having the functions sorted in separate files (except for the helper functions that live in something like utils.R
) really helps a lot but if you prefer to keep it as it is, it's also good for me 🙂
It's probably a matter of taste but I like having one R file per function (where the R file has the same name as the function). This makes the code basis easily accessible for new users and also facilitates debugging (the following references are based on the development version of your package that is currently on GitHub):
You have multiple functions in
signed_triangles.R
,blockmodel.R
,centrality_indices.R
,complex_matrices.R
,blockmodel.R
,balance_scores.R
,plot.R
,random_graphs.R
When debugging your package, I also saw that some functions are not documented:
You don't have documentation for
genclu()
(stored inblockmodel.R
)(Undocumented) helper functions (
circleFun()
andarc_dist()
; stored inrandom_graphs.R
- but probably rather belong toutils.R
? At least from a user perspective, it would make more sense to have them there if you don't want to have them in separate files)(This issue is part of the review: https://github.com/openjournals/joss-reviews/issues/4987)