Introduction to R
About this course
This course is a short introduction on using R for dealing with data.
Intended Learning Outcomes
The Intended Learning Outcomes (ILOs) for the entire course are:
- Demonstrate how R and RStudio work by transforming and cleaning different types of data into an appropriate format for analysis and creating graphical representations to visualise different types of data;
- Calculate summary statistics using R; and
- Interpret common error messages and use in-built help facilities to debug their code.
Each chapter contained within will come with its own specific ILOs which will be clearly specified at the top of each page.
These ILOs will be the points that will be covered in the assessments.
What will I need to complete this course?
To successfully complete this course you will need access to a computer that either already has, or you can download R and RStudio software on. This computer will need to use a Windows, Mac or Linux based operating system. You can run RStudio on a Chromebook sometimes, but the process is more complex (see here).
If you cannot use RStudio on your computer you might want to consider using RStudio Cloud.
All University of Glasgow Library computers should have this software installed. If you have enrolled in the University you should have access to these.
After the first lesson you will be given the task of either installing R and RStudio on your own personal computer, or finding another suitable method of accessing the software. Full instructions will be given in Chapter 1 of this coursebook.
If you are having issues with access talk to your tutors via the Moodle forum as soon as possible so that we can help you! R, like any skill, will get better with practice and we want to ensure you can practice and complete the assessments as easily as possible.
About the Assessments
These assessments allow you to revise the concepts that you have learned in class. These do not count towards the course grade and, although we encourage you to, there is no requirement to complete them.
These may take the form of coding assessments and/or multiple choice questions (MCQs) that will be delivered in the same format as the summative assessments - a downloadable file that you fill in the blanks of.
The answers for each of the formative assessments will be available at 5pm one week after the assessment is posted.
If you encounter something in the formative assessments that you want to ask a question about then please use the appropriate Moodle forum.
These are the assessments that count towards your course grade.
There will be 5 take-home exercises to complete as you progress through this course. They will be evenly spaced across the entire 10 week span (after L2, L4, L6, L8, and L10), occurring every two weeks. You will have one week from the time of the release of each assessment to submit your answer(s). The solutions of the summative assessments will be released with the grades and feedback (see schedule below).
For the summative assignments, we ask you to complete .Rmd files (either by answering multiple choice questions or producing code), and upload them to Moodle in the submission sections of a particular week. The .Rmd files and data for specific assignments will be provided in a zip folder you are asked to download and unzip before you start an assignment. The questions, whilst readable in the .Rmds, will also be posted in the
Summative Assignment - questions section. It is strongly recommended to read the question page in combination with the .Rmd, as they might provide additional information (such as giving you hints what output to expect, etc.).
Summative assessments will be due ONE HOUR before the start of the next class the following week (see schedule below for specific dates).
We recommend that you start these early and, if required, seek assistance from the staff as early as possible. Please make use of the Moodle
Schedule of summative assessments
|Summative assessment||Assesses ILOs from lectures||Assessment released||Submission due||Grades & Feedback released|
|1 (week 2)||1 and 2||20/01 at 6pm||27/01 at 5pm||03/02 at 5pm|
|2 (week 4)||3 and 4||03/02 at 6pm||10/02 at 5pm||17/02 at 5pm|
|3 (week 6)||5 and 6||17/02 at 6pm||24/02 at 5pm||02/03 at 5pm|
|4 (week 8)||7 and 8||02/03 at 6pm||09/03 at 5pm||16/03 at 5pm|
|5 (week 10)||7, 8, and 9||16/03 at 6pm||23/03 at 5pm||30/03 at 5pm|
Keep in mind that the column
Assesses ILOs from means that the assessment will test you predominantly on skills gained within the lectures listed (e.g. for week 4 that means lectures 3 and 4), however you will also need to use knowledge from previous lessons as your learning is supposed to be cumulative (e.g. basic knowledge from lectures 1 and 2).
We will never ask you to memorise any code as this is not how people produce code in reality. You may use notes and resources you complete in class to do these assessments and consult online resources to help you. You can work together to complete these tasks, but remember that grades are given on an individual basis and that you must not plagiarise the work of others.
For the purposes of your final grade, only 4 of these assessments will be counted and each will be worth 25%. The lowest score out of the 5 assessments will be dropped and not taken into account when calculating your final grade. We encourage you to complete all 5 assessments.
There will be penalties for late submissions. Your work will be assessed in the usual way, and the primary grade and secondary band will be adjusted to include reductions by two secondary bands for each working day (or part of a working day) the work was submitted late. For example, for submitting an assessment 6 hours after deadline with an assessed grade (had it been submitted on time) of A5, a penalty of 2 secondary bands reduction would result in a final grade of B2.
For extensions after 5 working days, you have to submit a good cause form. If an extension for good cause has been granted, and the extension is past the date that solutions for the assessment have been released, an alternative assessment will be provided.
Any blank document, or document that was submitted in a format other than an R Markdown file ending in .Rmd, will be considered as not submitted.
How to Submit Your Assessments
An .Rmd file to complete each summative assessment will be provided to you. In this file, you will be provided with code chunks in which to type your answers.
Once you have provided code in all of the appropriate slots you will then upload this file to the appropriate assessment submission page on Moodle.
Formative assessments are not to be uploaded to Moodle. You will be provided an answer key to which you can compare your own answers. If you have questions about either your own answers or those provided by the tutors then please ask about it on the appropriate Moodle forum.
You can ask questions on the Moodle Forum that accompanies this course. We ask that you do not post solutions to assessments here and any solutions posted will be removed.
Why are these materials open?
These materials have been adapted from various sources. Some of these materials have been Open Educational Materials with CC-BY-SA licenses. This means that any materials that use them must also be made open (SA means “share alike”).
We also believe in the value of open educational materials. Your course fees contribute to the development of this course, but also to providing you with lectures, supporting staff and certification and credits at the end of the course.