Expected Preparations:

  [RPR]
Coding_style
 
  The units listed above are part of this course and contain important preparatory material.  

Keywords: Introduction to R

Objectives:

  • Install the actual course R scripts on your computer.

Outcomes:

  • The ABC-units RStudio project is installed in its own directory on your computer and you are ready to work with the code.


Deliverables:

  • You have installed the ABC-Units RStudio project and worked through the required introductory steps to set it up.

Evaluation:

NA: This unit is not evaluated for course marks.

Contents

This page collects the learning units for an introduction to R.

This is a “milestone unit”. Its purpose is mostly to collect a number of preparatory units into a single, common prerequisite. You are expected to be familiar and competent with all preparatory material at this point, and to have documented your learning in your journal. After a few more preparatory tasks you are ready to explore the bioinformatics landscape. Proceed with the tasks below …

The ABC RStudio Project

R-scripts and other resources for the learning units of this course are collected in an RStudio project. This makes it easy to update and distribute code. I push update material to the GitHub repository of the project for any unit, all you need to do is to pull the updated project to receive all updates and new files on your computer. Version control is really useful for this. However, there is an issue that you need to be aware of. If you create your own, local files and then commit them, git will complain that it would be overwriting such local material. As long as you don’t commit your files then all should be fine. This means you’ll need to do your own “versioning” by saving your own scripts under a different name from time to time. Once again: in this context: * saving your own files is fine; * committing your own files to version control will cause problems; * changes you make to course material files and save under the same filename (like adding comments and notes) will not persist, these changes will be overwritten with the next update. You need to “Save As…” with a new filename (for example, prefix the original name with “my”).

 

Task…

  • Open RStudio and create a New Project… cloned from a git version control directory. The repository URL is https://github.com/hyginn/ABC-units. Create this in the same way as you did for the R-tutorial.
  • As requested on the console, type init(). This will setup and configure some files.
  • Work through the task: “Local script” in the RPR-Introduction.R script.

 

Review

Understanding the setup

Imagine you made a typo when you entered your eMail address and now the file scripts/.myProfile.R contains a mistake. How do you fix this?

scripts/.myProfile.R is itself a file in the local working directory. Simply open it with the RStudio editor, fix the error, and save. Then type source(“scripts/.myProfile.R”) into the console.

 

Questions, comments

If in doubt, ask! If anything about this contents is not clear to you, do not proceed but ask for clarification. If you have ideas about how to make this material better, let’s hear them. We are aiming to compile a list of FAQs for all learning units, and your contributions will count towards your participation marks.

Improve this page! If you have questions or comments, please post them on the Quercus Discussion board with a subject line that includes the name of the unit.

References

Page ID: RPR-Introduction

Keywords: Introduction to R

Author:
Boris Steipe ( <boris.steipe@utoronto.ca> )
Created:
2017-08-05
Last modified:
2022-09-14
Version:
1.0.1
Version History:
–  1.0.1 Maintenance
–  1.0 Completed to first live version.
–  0.1 First stub
Tagged with:
–  Milestone
–  Live
–  Has review questions

 

[END]