Software Carpentry: R for Reproducible Software Analysis. https://swcarpentry.github.io/r-novice-gapminder/

Learning Objectives

  1. To be able read R help files for functions and special operators.
  2. To be able to use CRAN task views to identify packages to solve a problem.
  3. To be able to seek help from your peers.

Questions

  1. How can I get help in R? (How to access and read Help Files)
  students<-100
  students
  
  students<-"hard-working"
  students
packageDescription("stats")

install.packages("ggplot2")

Answers

  1. Reading Help Files
?barplot

or this:

help(barplot)

Or if you don’t remember the name of the function use two question marks like this to do a search

??bar
?"<-"

This assignment operator is used to assign a value to a name, like this:

number_of_students <- 100

where the number of students in the class is 100!

vignette(package="ggplot2")
vignette("ggplot2-specs")
  1. CRAN task views https:cran.r-project.org/web/views helps to provide guidance on which packages you might need for a certain task, for example the “Genetics” package for Statistical Genetics.

  2. Getting help from others Stack Overflow https:stackoverflow.com is a place where you can post questions, search questions others have asked, and contribute to answering questions from the community. Use “?dput” to dump the data you’re working with into a format that can be copy/pasted by someone else into their own R session and “sessionInfo()” to get useful info about your operating system, installed packages and versions. Send this info along with your question.

?dput
sessionInfo()

Other ways to find help.

  1. Official R Help

Ways to find help in this class.

  1. In class, the chat will be monitored for questions and answered by co-instructors or helpers during the class.

  2. Office Hours (Thursdays from 12 - 1 PM). Email mailto:ncibtep@nih.gov with a question or topic and to reserve a spot.

  3. Outside of class, we have created a Question and Answer Forum for this class on the BTEP web site at https:btep.ccr.cancer.gov/question/r-workshop/ where you can post any questions and also contribute to answers. If you don’t have an account on the BTEP web site already, you need to create one to be able the access this resource.