This website is for students in Crim 250: Statistics for the Social Sciences to learn R and statistics.

Note: The rest of the lectures, assignments, and exams are on the Canvas site. It is your responsibility to upload your completed assignments to your own website.

Getting started with the toolkit

Before we meet for our next class there are few things you should try at home to get started.

This video (https://www.youtube.com/watch?v=nc7XhQrasCM&ab_channel=ProgrammingForPsychologists) will guide you through setting up all the software you will need. For now, you don’t need to understand all the details. It’s most important that you set up your personal page and download the relevant programs. Note: Credit is given to Matthew Crump, a Psychology professor at CUNY, who made that awesome video.

  1. Download and install R on your computer. This is the R website https://www.r-project.org

  2. Download and install R-studio. You must download and install R first before installing R-studio. The R-studio website is https://www.rstudio.com

  3. Create a free github account. The github website is https://github.com

  4. Download and install github desktop https://desktop.github.com

  5. At this point you should have downloaded R and R-studio to your own computer. This will allow you to run R and R-studio locally. It is also possible to run R-studio in the cloud through your web-browser, but we won’t be doing that in this class.

So, I made the website, now how do I edit it?

To edit your website, you can follow these steps.

  1. Click middle button: “Show in Finder”. This opens a new RStudio with the file LabJournal website.Rproj. You can also just find this file in your Finder and open it up.

  2. On RStudio, click: index.Rmd (or Journal.Rmd if that’s the page you want to edit). Edit text and save. You can preview changes on the website by clicking Knit above the text.

  3. Click on: Build Website (files inside the docs folder have been changed as a result of compiling the website).

  4. On Github desktop: Write a description of the changes. Commit to master, push origin.

  5. Now reload website, and that should be it. (Did you forget your website’s URL? You can find it under Github.com > Repositories > Settings > Pages).

How do I change the titles of the pages?

This renames Journal as Assignments.

  1. In Journal.Rmd, change the title at the top to title: “Assignments”, save.

  2. On RStudio, open _site.yml. Change the text and href to match the name you want, e.g. replace “Journal” to “Assignments”.

  3. On RStudio, on the bottom right where you see your Files, click the box to the left of Journal.RmD and then click Rename (a button right above). Rename as Assignments.Rmd.

  4. Select the boxes for Journal_cache and Journal_files, and click Delete (button above). In the folder docs, select the files Journal.html and Journal_files, and delete those as well.

  5. Save, Build website. Go to GitHub desktop, commit and push.

How do I add a new page?

  1. In _site.yml, copy the two lines “- text:”Assignments” and “href: RBasics.html”, and paste them right below the ones you copied. Change the name to whatever you like, e.g., “New Page”.

  2. In RStudio, select the box to the left of the file Assignments.Rmd, click More above, and select Copy. Enter a new name, e.g. NewPage.Rmd.

  3. In RStudio, go into the NewPage.Rmd file and edit the title and text.

  4. Save, Build website. Go to GitHub desktop, commit and push.