Hi Naupaka,
I can't speak for what would be most successful in a classroom, though.
For my graduate research work with R, I follow the guidelines of
http://r-pkgs.had.co.nz/ without changing much namely:
1) Create a package with devtools, then create the analysis script in
vignettes/ with devtools::use_vignettes("name-of-vignette"). Edit the Rmd
file and run code blocks with Ctrl+Enter.
2) Create functions as needed in the R/ directory.
3) Add dependencies directly to DESCRIPTION (one could also use use
devtools::use_package())
4) Update NAMESPACE from Roxygen comments in R/ files with
devtools::document()
5) Add testthat unit tests for those R functions.
6) Once in a while run devtools::check()
The book introduction suggests that this practice is somewhat typical (
http://r-pkgs.had.co.nz/intro.html) and am curious about others'
experiences.
There is some cognitive overhead of working with packages for newer
programmers, so you may want to have the workflow and gotchas in a
cheatsheet or require some amount of prior R experience for the students to
value that particular way of doing things.
Pariksheet
_______________________________________________
Discuss mailing list
[email protected]
http://lists.software-carpentry.org/listinfo/discuss