BCB744 Intro R Self-Assessment

Published

February 1, 2025

Here is the self-assessment structure and method we will apply to the BCB744 course. This page will help you navigate the various self assessment components, which are comprised of:

To this end, the self-assessment structure will help you review the relevant course material. If you find you are struggling with a section, ask for help before it is too late! It is best to admit in class if you are falling behind so that others might benefit as well. Chances are, you are not alone.

1 Progress Portfolio

Starting tomorrow, 3 February 2026, you will submit a thoroughly annotated .html file produced from a Quarto document that outlines each day’s teaching material you covered as you followed along in the class. Since it is made within Quarto, you will have to include code chunks, their output, and some narrative text that describes what each portion of your code does. The Portfolio may include:

  • Evidence that you have taken notes in the class, especially for those portions of the work that you deemed tricky.
  • Evidence that you have followed along in the class in interactive sessions, in which case you will reproduce the examples I asked you to work through.
  • The outcomes of the various sections in the lecture material (web pages accessed in the Tangled Bank menu), which may be called something like “Do This Now” or “Exercise”.
    • The more comprehensive your Portfolios, and the tidier it is (visual appearance), the better the outcome of our assessments will be.

The document must be:

  • One continuous file that you add to each day (use a clear heading with the date and topic for every new day).
  • Rendered to HTML and submitted daily starting 3 February 2026, on the same day of the lecture your portfolio material covers.
  • Complete and readable, with the code you ran, the outputs it produced, and a few sentences explaining what the code does. Include any notes that you made for your future self, which will aid you to study the work for assessments you will encounter. Any text added must be in your own words, and explained in a way that you understand (in good English, without grammatical and spelling errors).
  • Neatly structured, with short sections, headings, and clear figure/table outputs (no screenshots). I will significantly weigh the visual impression you create, so take pride in your work.

Your Progress Portfolios must be submitted on the same day as the lectures!

Submission Instructions

  • Deadline: Submit your work by no later than 23:59 AM on the day of the lecture.
  • Submission Format: Submit on iKamva as an HTML page.
  • Email Subject Line: In case you have to email your work (e.g., no iKamva access), use the following email subject line:
    • 📌 BCB744 Portfolio [Lecture Number]: [Your Surname]
  • File Naming Convention:
    • 📄 BCB744_Portfolio_[Lecture Number]_[Your_Surname].html, e.g., BCB744_Portfolio_L3_Smit.html

Failure to adhere to these requirements may result in a grade penalty. Ensure that your slides are clear, well-structured, and visually professional.

2 Tasks A-H

Tasks E-H will be posted in due course.

Submit your answers to the Tasks A-H questions no later than 8:00 on the day after the corresponding lectures (e.g., Monday/Tuesday’s lecture material is covered by Task A, and must be submitted on Wednesday morning no later than 8:00).

You must submit your answers to the Questions for each Task.

Assessment Instructions

  • Immediately after we have gone over the task answers in the class (e.g., on Tuesday morning for Task A):
    1. Add the marks you gave yourself for each question (according to the model answers we discussed) to the MS Excel spreadsheed, which you can download from the top of each Task’s question page (e.g., here).
    2. To calculate your Final Score, rate your performance according to the rubric, enter those marks next to the “Content” and “Code Formatting & Presentation” entries on the spreadsheet. Once those marks have been supplied and the final mark will automagically be calculated.
  • Rename the Excel file correctly (Name and Surname, and take note of the underscores):
    • e.g., 📄 BCB744_Task_A_Smit.xlsx
  • Submit it on iKamva where it will be kept on record.
  • Each day I will randomly select five of the submitted tasks to check how honest you were in your self-assessment. If you are found to be dishonest, you will be penalised by losing marks from the presentations. If you are honest, you will be rewarded with bonus marks.

Submission Instructions

  • Deadline: Submit your work by 8:00 AM on the day after the tasks were issued.
  • Submission Format: Submit on iKamva as an HTML document.
  • Email Subject Line: In case you have to email your work (e.g., no iKamva access), use the following subject line:
    • 📌 BCB744 Task [The Number]: [Your Surname]
  • File Naming Convention:
    • 📄 BCB744_Task_[The Number]_[Your_Surname].html, e.g., BCB744_Task_A_Smit.html

Failure to adhere to these requirements may result in a grade penalty. Ensure that your slides are clear, well-structured, and visually professional.

3 Additional Practice Exercises

Complete the Practice Exercises to test your skills. These are for personal use to do in your own time, over and above any follow-along exercises in the class, and over and above Tasks A-H.

You do not need to submit anything for the Practice Exercises — those are for your own benefit.

Use them to assess your understanding, and tell us in class where you might require extra help.

3.1 1. R and RStudio

Understanding Level: Beginner / Intermediate / Advanced

3.1.1 Key concepts

  1. Installation of R and RStudio
  2. Understanding the RStudio IDE
  3. Navigating the RStudio interface
  4. Basic R syntax

3.1.2 Practice exercises

  • Open RStudio. Create a new R script.
  • Execute basic arithmetic operations (e.g., 2 + 2, 5 * 3) in the console.
  • Explore the different panes in the RStudio interface (Source, Console, Environment, History, Files, Plots, Packages, Help).

3.2 2. Working with Data and Code

Understanding Level: Beginner / Intermediate / Advanced

3.2.1 Key concepts

  1. Importing data into R.
  2. Understanding different types of data files.
  3. Understanding data structures (vectors, lists, data frames).
  4. Basic coding practices.

3.3 3. Data Classes and Structures in R

Understanding Level: Beginner / Intermediate / Advanced

3.3.1 Key concepts

  1. Understanding data classes in R.
  2. Working with vectors, matrices, and data frames.
  3. Using indexing and subsetting.

3.3.2 Practice exercises

  • Create a vector of numbers and a vector of characters and assign them to the variables numbs and letts, respectively.
  • Place these two variables (numbs and letts) into a data frame called numbsletts.
  • Create a matrix with the following data:
matrix_data <- matrix(1:12, nrow = 3, ncol = 4)
  • Assign the row names c("row1", "row2", "row3") and column names c("col1", "col2", "col3", "col4") to the matrix.
  • Extract the number in the second row and in the third column.
  • Create a new matrix with the same data but with the rows and columns transposed.
  • Find five datasets that you like the look and content of. They may be some of the datasets built into R (and the various packages you downloaded), or they may be ones you found somewhere else. For each:
    • describe the data types (statistical view) of the variables contained within,
    • using the functions shown in the Chapter, describe their R data classes of each variable,
    • using the functions shown in the Chapter, describe their data structures.

3.4 4. R Workflows

Understanding Level: Beginner / Intermediate / Advanced

3.4.1 Key concepts

  1. Creating reproducible workflows
  2. Using R scripts
  3. Commenting code
  4. Using packages

3.4.2 Practice exercises

  • Create a vector of numbers and a vector of characters and assign them to the variables numbs and letts, respectively.
  • Place these two variables (numbs and letts) into a data frame called numbsletts.
  • Import the built-in dataset ChickWeight using data(ChickWeight) and view it.
  • Use head() and tail() to view the first and last rows.
  • Use str() to see the structure of the data frame.
  • Create an R script that imports the ChickWeight dataset and assigns it to the object kfc.
  • Add comments to your script explaining what each line of code does.

Use ?datasets :: ChickWeight to find help for the dataset ChickWeight. The course website has links to download additional datasets.

3.5 5. Graphics with ggplot2

Understanding Level: Beginner / Intermediate / Advanced

3.5.1 Key concepts

  1. Creating basic plots with ggplot2.
  2. Understanding the grammar of graphics.
  3. Using layers, aesthetics, and geoms.

3.5.2 Practice exercises

  • Create a scatter plot using ggplot2 with the ChickWeight dataset, plotting weight against Time.
  • Create separate figures for each Diet group (i.e. you will have four plots, one for each diet group).
  • Add appropriate titles and axes labels to the plots.
  • Experiment with different geoms like geom_line() and geom_point().

3.6 6. Faceting Figures

Understanding Level: Beginner / Intermediate / Advanced

3.6.1 Key concepts

  1. Using facet_wrap() and facet_grid() to create subplots.
  2. Displaying data across multiple dimensions.

3.6.2 Practice exercises

  • Create a scatter plot with ggplot2 using the ChickWeight dataset and use facet_wrap() to create subplots for each Diet.
  • Experiment with different facet_wrap() and facet_grid() arguments.

3.7 7. Brewing Colours

Understanding Level: Beginner / Intermediate / Advanced

3.7.1 Key concepts

  1. Customising colours in plots.
  2. Using colour palettes effectively.

3.7.2 Practice exercises

  • Recreate the plots from previous exercises and experiment with different colour scales (e.g., using scale_color_brewer(), scale_fill_viridis_c()).
  • Choose colours that are appropriate and informative for the data you are displaying.

3.8 8. Mapping with ggplot2

Understanding Level: Beginner / Intermediate / Advanced

3.8.1 Key concepts

  1. Creating basic maps using ggplot2.
  2. Using spatial data.

3.8.2 Practice exercises

  • Staying with the figure you created above, change various aspcects of the theme, line types, thickness and colour fills and other colours, etc. Create some variations for the map, save them as separate figures.
  • Think about which aethetic choices make the most pleasing maps.

3.9 9. Mapping with Style

Understanding Level: Beginner / Intermediate / Advanced

3.9.1 Key concepts

  1. Customising map aesthetics.
  2. Adding themes to maps.

3.10 10. Mapping with Natural Earth and the Sf Package

Understanding Level: Beginner / Intermediate / Advanced

3.10.1 Key concepts

  1. Using the sf package for spatial data.
  2. Working with Natural Earth data.

3.10.2 Practice exercises

  • Use the rnaturalearth package to download a Natural Earth map of a country of your choice, then plot it using the sf package.
  • Explore other spatial datasets available with the rnaturalearth package.

3.11 12, 13 & 14. Tidy Data

Understanding Level: Beginner / Intermediate / Advanced

3.11.1 Key concepts

  1. Principles of tidy data.
  2. Using tidyr for data reshaping.
  3. Using dplyr for data wrangling.

3.11.2 Practice exercises

3.12 Lecture 15. Recap

Understanding Level: Beginner / Intermediate / Advanced

3.12.1 Key concepts

  1. Review of all key concepts.
  2. Practical application of learned skills.

3.12.2 Practice exercises

Using a dataset of your choice, perform a full analysis, including data cleaning, manipulation, and visualisation using all the skills learned from previous modules.

3.13 How to Use This Worksheet

  • Be Honest: Accurately assess your understanding of each topic to identify areas you need to review.
  • Practice Regularly: Consistent practice is key to mastering R.
  • Seek Help: Do not hesitate to ask questions on the GitHub Issues page for help.
  • Collaborate: Work with your peers and discuss the concepts [8, 19].
  • Use the Resources: Make full use of the provided links and materials for further study.
  • Review: If you are struggling, review the course material provided by the instructor.

Reuse

Citation

BibTeX citation:
@online{smit,_a._j.2025,
  author = {Smit, A. J.,},
  title = {BCB744 {Intro} {R} {Self-Assessment}},
  date = {2025-02-01},
  url = {http://tangledbank.netlify.app/BCB744/assessments/BCB744_Intro_R_Self-Assessment.html},
  langid = {en}
}
For attribution, please cite this work as:
Smit, A. J. (2025) BCB744 Intro R Self-Assessment. http://tangledbank.netlify.app/BCB744/assessments/BCB744_Intro_R_Self-Assessment.html.