Skip to content

richarddmorey/RprojectDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RprojectDemo

This demonstration shows how to organize a research project using R and Rmarkdown in such a way that:

  • Analyses are reproducible
  • Reports, talks, and papers all use the same R code
  • Papers are compiled to HTML and PDF/Word at the same time; your paper is a website!
  • Websites can include interactive figures, while PDF/Word contains static ones

The compiled example paper are in papers/Rpaper1/text/papaja_paper (PDF) and papers/Rpaper1/text/html_paper (HTML).

How to prepare

You might need to install some things first. You'll need some R packages.

  • knitr
  • papaja (for the PDF output )
  • rmdformats (for HTML templates)
  • pubprint (for easy statistics formatting)

You can install these packages by running the following command in R:

install.packages(c('knitr','papaja','rmdformats','pubprint'))

Windows

Software to download and install:

If you would like to download bibtex reference files from the web, you'll also need:

If you do not want to download bibtex reference files, just comment the relevent files in the buildme.bat file with REM at the beginning of the line.

Additional tasks:

Add the R binary directory to the path.

OSX

Software to download and install:

Linux

Install using your favorite package manager, if available.

How to compile

  • Download the whole repository
  • Edit the text in papers/Rpaper1/text/sections/ if you like. The paper structure is in structure.Rmd; each section is a file in this directory.
  • Set the Rstudio build script to papers/Rpaper1/buildme (or papers/Rpaper1/buildme.bat in Windows)
  • Also, check out the website template in the website directory. With GitHub, you can easily create and host your own webpages, including the HTML version of your paper! You'll have to turn on GitHub pages, though.

The PDF version of the paper will be in papers/Rpaper1/text/papaja_paper, and the HTML version will be in papers/Rpaper1/text/html_paper.

About

An example of a research project layout

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages