Main content

Home

Menu

Loading wiki pages...

View
Wiki Version:
Thursday 08 September 2022\ #### **Required pre-session activities:** - Complete this [self-directed tidyverse tutorial](https://canvas.ubc.ca/courses/97662/files/19784371?wrap=1 "LDP-SDM-2021-lesson2_tutorial.zip")[ Download self-directed tidyverse tutorial](https://canvas.ubc.ca/courses/97662/files/19784371/download?download_frd=1)(includes R script and the bromeliad data we will be working with in upcoming sessions). As the "BWG dataframes relation.ppt" file in this zip is not opening, I have added it to this lesson module as a pdf (outside the zip folder).\ \ #### **Suggested pre-session readings:** - Feel free to peruse the (recently-updated) [data tidying](https://canvas.ubc.ca/courses/97662/files/19784381?wrap=1 "data_tidying_cheat_sheet.pdf")[ Download data tidying](https://canvas.ubc.ca/courses/97662/files/19784381/download?download_frd=1)and [data transformation](https://canvas.ubc.ca/courses/97662/files/19784380?wrap=1 "data_transformation_cheat_sheet.pdf")[ Download data transformation](https://canvas.ubc.ca/courses/97662/files/19784380/download?download_frd=1)'cheat sheets' from RStudio - You can find the whole list of available cheat sheets at: [https://www.rstudio.com/resources/cheatsheets/ Links to an external site.](https://www.rstudio.com/resources/cheatsheets/)\   #### **In-session activities:** 1. **Questions / admin (5 min)**\ \ 2. **Lecture (30 min; Rachel Germain)** - Working with data: script-based approaches to data wrangling - Principles of tidy data - Sneak peek: when/why we need relational databases - Quick overview of the Bromeliad dataset - See: [lesson 2 lecture slides](https://canvas.ubc.ca/courses/97662/files/22350301?wrap=1)[ Download lesson 2 lecture slides](https://canvas.ubc.ca/courses/97662/files/22350301/download?download_frd=1)\ \ 3. **Activity / discussion (50 min)** - See: [lesson 2 activity description](https://canvas.ubc.ca/courses/97662/files/19784393?wrap=1 "LDP-SDM-2021-lesson2_activity.R")[ Download lesson 2 activity description](https://canvas.ubc.ca/courses/97662/files/19784393/download?download_frd=1)(R script) - Break-out group of \~4 people grouped according to R skill level (30 min) - Download the lesson 2 activity R script and copy it into the same folder where you saved the pre-lesson tutorial  - Select one of the questions to address and, as a group, either (1) discuss the approach and tidyverse/base R functions you would use to address it, or (2) write a short script to find the solutions - Class discussion and review of [possible solutions](https://canvas.ubc.ca/courses/97662/files/19784401?wrap=1 "LDP-SDM-2021-lesson2_solutions.R")[ Download possible solutions](https://canvas.ubc.ca/courses/97662/files/19784401/download?download_frd=1)to each question (10 min; solutions will be published after class)\ \ #### **Supporting materials:** - A short introduction to [tidyr, dplyr, and the pipe %\>%](https://canvas.ubc.ca/courses/97662/files/19784395?wrap=1 "LDP-SYNTH-2021-lesson4_tidyr_dplyr_pipe_intro.pdf")[ Download tidyr, dplyr, and the pipe %\>%](https://canvas.ubc.ca/courses/97662/files/19784395/download?download_frd=1)(borrowed from the LDP Synthesis Statistics module) - An excellent tutorial on [10 up-to-date ways to do common data tasks in RLinks to an external site.](https://towardsdatascience.com/ten-up-to-date-ways-to-do-common-data-tasks-in-r-4f15e56c92d) - **For more information on the bromeliad dataset, check out**:\ Céréghino, R., Pillar, V.D., Srivastava, D.S., de Omena, P.M., Macdonald, A.A.M., Barberis, I.M., Corbara, B., et al. (2018). Constraints on the functional space of aquatic invertebrates in bromeliads. *Functional Ecology*, 32, 2435-2447. [https://doi.org/10.1111/1365-2435.13141 Links to an external site.](https://doi.org/10.1111/1365-2435.13141)[**PDF**](https://canvas.ubc.ca/courses/97662/files/19784398?wrap=1 "Céréghino et al. 2018 Funct. Ecol.pdf")[ ](https://canvas.ubc.ca/courses/97662/files/19784398/download?download_frd=1)
OSF does not support the use of Internet Explorer. For optimal performance, please switch to another browser.
Accept
This website relies on cookies to help provide a better user experience. By clicking Accept or continuing to use the site, you agree. For more information, see our Privacy Policy and information on cookie use.
Accept
×

Start managing your projects on the OSF today.

Free and easy to use, the Open Science Framework supports the entire research lifecycle: planning, execution, reporting, archiving, and discovery.