Coder Social home page Coder Social logo

Oxygenize R documentation about rsdmx HOT 4 CLOSED

opensdmx avatar opensdmx commented on August 23, 2024
Oxygenize R documentation

from rsdmx.

Comments (4)

Tungurahua avatar Tungurahua commented on August 23, 2024

I see the following pros and cons for using 'Roxygen2' for documentation:
Pro

  • Code and documentation are stored in the same file thus a switch between files is not needed.
  • Roxygen allows for automatic creation of 'NAMESPACE' and 'Collate' fields.
  • in my opinion Roxygen sources are easier to read than plain .Rd files. However that's certainly a matter of general preference.
  • Rstudio includes support (e.g tab-completion etc) for the fields available in .Rd files
  • Roxygen code resides in an .rscript file. In RStudio this means that code examples can be executed while writing the documentation with the same shortcut keys used when coding.

Con

  • automatic creation of NAMESPACEand collate might mean a loss of flexibility (though I don't see this at the moment
  • Using an additional intermediate step (use Roxygen to create .Rd files could be an additional source for systematic error. However I think Roxygen2 is widely used and reasonably stable.
  • automatic creation of .Rd files means that git staging area will get filled with .Rd files in the staging area while the change has been introduced only in the .r files. Solution might be to put the contents of the man folder into ignore.

from rsdmx.

Tungurahua avatar Tungurahua commented on August 23, 2024

On R-bloggers Yihui Xie (knitRauthor) announces a package rd2roxygen that automatically converts Rd files to Roxygen. Might be worth a try if the move to Roxygen is to be taken.

The announcement has been released in 2010.

from rsdmx.

eblondel avatar eblondel commented on August 23, 2024

Thanks for to pointing to this package.. i will investigate on it. Roxygen seems to have many benefits, but i've also seen criticisms. This needs more assessment, and see how and when to move forward.

from rsdmx.

Tungurahua avatar Tungurahua commented on August 23, 2024

No worries. I didn't mean to push for roxygen in any way. As noted above Rd is the standard documentation format for R packages and roxygen - despite all convenience - is an additional linguistic layer that needs to be resolved to create the documentation. Or to put it simple: there might be bugs in the parser from roxygen to Rd. This alone is more than enough reason to be cautious. I think this issue is even raised somewhere in the roxygen vignettes where it's stated that Rd - though more difficult to handle - still has the greater flexibility.
I just ran across the post and wanted to note it down. This issue seemed to be a good place.

from rsdmx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.