14.1 Meet R

14.1.1 Introduction

R is a popular programming language for statistical computing and data visualization [wikipedia](https://wikipedia.org/wiki/R_(programming_language). Notable features include the RStudio IDE built to help you be more productive with R (and Python); the tidyverse collection of packages that aims to make data science faster, easier, and more fun; and importantly the Bioconductor project with its active support community and robust genomics tooling. Now that you completed “test-driveR” and got a taste of analyzing a real world genomics dataset using R it’s time to learn more about how R stores and operates on data using concepts such as variables, vectors, and data.frames.

14.1.2 Activity

Estimated time: 25 min

14.1.2.1 Instructions

  1. Resume your C-MOOR LearnR container
  1. Open sciserver.org in a web browser and log in to your account.

  2. Click “Home” in the top menu to return to the home page.

  3. Scroll down to the second set of boxes and click “Compute”.

  4. Resume your C-MOOR LearnR container by clicking on its name.

  1. Complete your next LearnR tutorial
  1. Click on “Meet R!”. The tutorial will open in a new tab.

  2. Complete the tutorial and answer the questions below.

14.1.2.2 Questions

1. Variables – Define what is a variable, give a line of R code that stores information in a variable, and explain how one would view the data stored in a variable.
Define variable:
Code:
Explain:


2. Vectors – Provide two lines of R code, one which stores a vector of numbers in a variable, and one which performs a mathematical operation on each element of that variable (e.g. multiplication).
Code 1:
Code 2:


3. Plotting – Copy and paste as text your code from the final code block in the tutorial. Also insert a screenshot of your resulting plot.
Code text:
Plot screenshot:


14.1.3 Grading Criteria

  • Download as Microsoft Word (.docx) and upload on Canvas

14.1.4 Footnotes

Resources

Contributions and Affiliations

  • Katherine Cox, Johns Hopkins University
  • Frederick Tan, Johns Hopkins University

Last Revised: February 2025