benmarwick / rrtools

rrtools: Tools for Writing Reproducible Research in R
Other
671 stars 85 forks source link

documentation and templates #48

Closed wolass closed 6 years ago

wolass commented 6 years ago

I have introduced the recent issues #44, #45, #46, #47.

On top of that I added another folder in the templates to have multiple journals ready. For example if one would like to submit to JAS - they probably would like to have bibliography.csl as well as the template.docx in the same folder.

The .csl file should not be in the paper folder anyway.

benmarwick commented 6 years ago

Thank you very much, these are all excellent, and most useful and welcome!

The only detail that I query here is devtools::load_all(".", quiet = T) in place of library(rrtools). This a something of a stylistic choice, with load_all suiting the researcher who writes code in R script files that they want to use in the Rmd (as you do), and library suiting the researcher who writes code as functions in /R, as in a traditional R package, and then uses these functions in the Rmd file (as I sometimes do, and other times I have all the R code in the Rmd, so I use neither approach!).

I don't think it's very productive to debate which one is best (I think 'library' promotes better practice because it required writing functions and enables testing, but it's also more complex to code and cumbersome to work with, and I'm not 100% committed to it), so let's go with your load_all for now, and see how other people find it.

Could you also make these changes before we accept this PR:

Thanks again for taking to time to improve this package, much appreciated!

wolass commented 6 years ago

Sorry, this is my first real pull request :) I still have to get the hang of it!

I'm glad that you think it is at least a bit helpfull

benmarwick commented 6 years ago

Thanks again, this is really very helpful! I just thought I'd check to see if @nevrome has any insights into the load_all/library topic that we're discussing here, since he often thinks of things that I haven't, on these topics.

nevrome commented 6 years ago

Thanks for the great input @wolass. I'll take a look at your changes.

benmarwick commented 6 years ago

Thanks again, this is great. I will merge this PR now, then I'll make the same changes that you've made here to the paper.Rmd in the inst/template, because this is actually the source of the paper.Rmd that we get when we run rrtools::use_analysis()

wolass commented 6 years ago

Ahh... Exactly... the inst/ folder ... Thanks! I forgot that it comes from there... Thanks!