Skip to content

Instantly share code, notes, and snippets.

@anyadoc
Last active September 13, 2023 16:29
Show Gist options
  • Save anyadoc/23d53b66e2e37b27bb74d444d676249c to your computer and use it in GitHub Desktop.
Save anyadoc/23d53b66e2e37b27bb74d444d676249c to your computer and use it in GitHub Desktop.
R Notebook Instructions for Disease Ecology (WILD 5200/6200) students

Aniruddha Belsare
Assistant Professor of Disease Ecology
Email: abelsare@auburn.edu
Website: https://avbelsare.netlify.app
Twitter: https://twitter.com/anyadoc


Step-by-step instructions: R, R Studio, R Notebook and Github


  1. Download R: Link https://cran.r-project.org/

  2. Download RStudio: Link https://posit.co/products/open-source/rstudio/

Useful reference: Hands-on programming with R Garrett Grolemund
Available here: https://rstudio-education.github.io/hopr/


  1. Open RStudio.

Screenshot_RStudio


  1. Create a new R Notebook.

RStudio2


Change title to DE5200 (DE6200 if you are a graduate student)/ Tools7970.

Select and delete everything below the three dashed line (---) as shown below (highlighted in blue).

Save the file as DEN_[your last name] e.g. DEN_Smith. WILD 7970 students please save the file as Tools_[your_last_name].

RStudio3

Name the folder appropriately (e.g. DisEco2023). This folder with your notebook's .Rmd file is the working directory by default.


You will use this notebook to write reports throughout the semester. Add commentary (your notes, observations, plots, images, etc.) using the Markdown format.This format is useful for writing reproducible, dynamic reports with R. R Notebooks work well with version control.
Start typing in the top left pane. You can write text as well as code in this R Notebook.

To insert a code chunk, press Ctrl + Alt + I .

codechunk

To add an image use the following syntax:

insert_image_RNotebook

Save the respective image in the folder containing the notebook .Rmd file. It will be a good idea to create a folder in your working directory titled 'images' and save the .png file here. Now the path-to-image-here becomes images/EpiTriad.png . The 'alt text here ' is the image caption.

Task 1:
WILD 7970 students: add image tools.png to your R Notebook.

Image can be downloaded from https://github.com/anyadoc/Tools_WILD7970/blob/main/tools.png
WILD 500/6200 students: add image EpiTriad.png to your R Notebook.

Image can be download from https://github.com/anyadoc/audiseco/blob/main/EpiTriad.png


  1. Github

Sign up for a new Github account: https://docs.github.com/en/get-started/signing-up-for-github/signing-up-for-a-new-github-account

Help with Github: https://docs.github.com/en

Types of GitHub accounts: https://docs.github.com/en/get-started/learning-about-github/types-of-github-accounts

Choose Personal account - GitHub Free.

For detailed instructions, refer this gist: https://gist.github.com/anyadoc/377aa7231507377e0e1f2c909c94208e

Starring a repository: https://docs.github.com/en/get-started/exploring-projects-on-github/saving-repositories-with-stars

To keep track of the AUDiseaseEcology Repository (https://github.com/anyadoc/audiseco), go to the main page of the repository and in the top-right corner of the page click STAR.



Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment