TheAlgorithms/R

Add documentation in the code (something similar to Doxygen)

Panquesito7 opened this issue ยท 4 comments

Something similar to an issue in the Julia repository. See TheAlgorithms/Julia#7.

eshom commented

This might be possible using the knitr package. Specifically with knitr::spin(), which can convert R scripts to documents. This won't be as sophisticated as what Doxygen generates, and unfortunately Roxygen2 only works on packages, not individual R scripts.

That sounds fine, I guess. I don't really know too much about R, but we could start working on it. For PR reviewing, I could do documentation reviews, and someone else can do the code reviews if that's fine for you. ๐Ÿ™‚

eshom commented

@Panquesito7
I've made a small repository demonstrating how documentation could be generated from scripts using the knitr package.
https://github.com/eshom/R-knitspin-test
The documentation generation could be automated using github actions. I'm not too familiar with it, so github actions aren't included in the example currently.

Thoughts?

Looks great! Great job, @eshom! And about the GitHub Actions thingy, I could try to work on it. ๐Ÿ™‚