USC biostats R Handbook
Spring 2019
1 Welcome
If you find any mistake or have other contributions you would like added please follow steps outlined below. For bigger additions add an issue beforehand to get approved.
1.1 add chapter
To add a chapter create a file called chapternumber_chaptername.Rmd (for example 01_Introduction.Rmd).
1.2 editing a chapter
- Before you begin, make sure you: fork the repo, click “Clone or Download” button and copy the link
- Open R Studio and Click File< New Project<Version Control<Git
- Copy the link into the top box, name the copied repository whatever you would like, and select a location for the repository to be stored
- Edit the chapter you want, then save it
- In the R Console run the following:
bookdown::render_book("index.Rmd","bookdown::gitbook")
- Click on the Git tab in the top right window of your R Studio
- Click Commit
- Click on the files you would like to commit
- Add a commit message then click Commit
- Click on the green arrow to push to github
- Submit a pull request to the main repo so your changes can be incorporated
1.3 compile handbook
After updating, be sure to compile the handbook by setting your working directory and running
bookdown::render_book("index.Rmd", "bookdown::gitbook")