This is your opportunity to play around with several different data types, visualizations and descriptive statistical summaries. The assignment will ask that you submit a couple of examples of both data visualizations and tables, all properly formatted according to Section 5 of the UBCO Biology Procedures and Guidelines document.
Using R Scripts as an Alternative to RShiny
If you are feeling ambitious and would like to try making plots, calculating descriptive statistics, and performing analyses using R instead of the RShiny App, some R scripts are provided below for your use. These scripts align with the code used to produce figures, stats, and analyses in the RShiny App. However, by using these R Scripts you can edit code to customize the outputs (ie. change the fill colour on your figure etc.).
Instructions for Using R Scripts
Keep in mind that there will be no additional support through TA’s or instructors should you choose to use these scripts.
Before using these scripts, you’ll need to have both R and RStudio installed on your computer. See here in the BIOL 125 Lab Manual for instructions on how to install both of these programs.
There is a separate script for each type of variable combination.
- Both response and explanatory variables are categorical
- Both response and explanatory variables are quantitative
- Categorical explanatory variable and quantitative response variable
In each script there are step-by-step instructions for use. Alongside each line of code is a comment proceeded with a hashtag (#). The comments are either descriptions of what the code is doing or instructions describing things you need to do. Be sure to read everything! Some specific things you’ll need to do are:
- Make sure your working directory is set according to the instructions here in the Procedures and Guidelines Document
- Make sure the packages mentioned in the script are installed AND loaded (using the library function)
- Replace ‘insert-data-file-name-here.csv’ with the file name that your data is saved as to your computer
- Replace “X variable name” and “Y variable name” with the names of your x and y variables
- Replace “X label name” and “Y label name” with your desired x and y axes labels
- Replace “My Caption” with your desired figure caption
The rest of the code should run smoothly once these tasks are completed. To run each line of code click the ‘Run’ button at the top right of the working document.