I assume you can pull from and push to GitHub from RStudio.
Homework assignments will be stored in separate Git repositories under the uc-cfss
organization on GitHub. To complete a homework assignment, you need to:
.md
) file and any accompaying files, such as figures.
.md
) because your output format is github_document
as well as all the graphs generated from the code chunks. For other projects, this might be an HTML (.html
) or PDF (.pdf
) file.
Here are some minor tweaks that can make a big difference in how awesome your product is.
Reduce the friction for graders to get the hard-working source code (the .R
or .Rmd
file) and the front-facing report (.md
or .html
).
README.md
in the homework’s main directory to serve as the landing page for your submission. Whenever anyone visits this repo, this will be automatically rendered nicely! In particular, hyperlinks will work.README.md
file, create annotated links to the documents graders will need to access. Such as:
_files/
need to be available in the repo in order to appear hereSimply visiting an HTML file in a GitHub repo just shows ugly HTML source. You need to do a little extra work to see this rendered as a proper webpage.
https://github.com/uc-cfss/uc-cfss.github.io/blob/master/hw00_homework_guidelines.html
. Copy that URL!http://htmlpreview.github.io/?
to the URL. So the URL in your link should look something like this: http://htmlpreview.github.io/?https://github.com/uc-cfss/uc-cfss.github.io/blob/master/hw00_homework_guidelines.html
. You can learn more about this preview facility here.README.md
.devtools::session_info()
will produce something that looks like this:## Session info -------------------------------------------------------------
## setting value
## version R version 3.4.3 (2017-11-30)
## system x86_64, darwin15.6.0
## ui X11
## language (EN)
## collate en_US.UTF-8
## tz America/Chicago
## date 2018-04-05
## Packages -----------------------------------------------------------------
## package * version date source
## backports 1.1.2 2017-12-13 CRAN (R 3.4.3)
## base * 3.4.3 2017-12-07 local
## compiler 3.4.3 2017-12-07 local
## datasets * 3.4.3 2017-12-07 local
## devtools 1.13.5 2018-02-18 CRAN (R 3.4.3)
## digest 0.6.15 2018-01-28 CRAN (R 3.4.3)
## evaluate 0.10.1 2017-06-24 CRAN (R 3.4.1)
## graphics * 3.4.3 2017-12-07 local
## grDevices * 3.4.3 2017-12-07 local
## htmltools 0.3.6 2017-04-28 CRAN (R 3.4.0)
## knitr 1.20 2018-02-20 CRAN (R 3.4.3)
## magrittr 1.5 2014-11-22 CRAN (R 3.4.0)
## memoise 1.1.0 2017-04-21 CRAN (R 3.4.0)
## methods * 3.4.3 2017-12-07 local
## Rcpp 0.12.16 2018-03-13 CRAN (R 3.4.4)
## rmarkdown 1.9 2018-03-01 CRAN (R 3.4.3)
## rprojroot 1.3-2 2018-01-03 CRAN (R 3.4.3)
## stats * 3.4.3 2017-12-07 local
## stringi 1.1.7 2018-03-12 CRAN (R 3.4.3)
## stringr 1.3.0 2018-02-19 CRAN (R 3.4.3)
## tools 3.4.3 2017-12-07 local
## utils * 3.4.3 2017-12-07 local
## withr 2.1.2 2018-03-15 CRAN (R 3.4.4)
## yaml 2.1.18 2018-03-08 CRAN (R 3.4.4)
Instead of just printing an object with R, you could format the info in an attractive table. Some leads:
kable()
function from knitr
.xtable
, pander
.Not sure what #rstats package to use to make your lovely Reproducible Table? I made a flowchart for you! #knitr pic.twitter.com/5qC5EBADN4
— Andrew MacDonald (@polesasunder) May 7, 2014
This work is licensed under the CC BY-NC 4.0 Creative Commons License.