R — Biostatistics

Lesson 4 — RStudio & Histograms

By


Goals of this lesson:

1) Learn to use RStudio

2) Create histograms via the R command:

hist()

 

Installing and Starting RStudio

Notice that the RStudio and R Console applications have different icons:

If you haven’t installed RStudio, see the download instructions on the syllabus for details.

If you use a PC, please note that RStudio has the same layout on both Macs and PCs. If you find your screen layout very different than that shown in the video, that means that you are not using the RStudio application.

To find where the RStudio is on your PC and what the screen layout looks like, watch the following video starting from the time-mark of 3:00:

https://www.youtube.com/watch?v=GAGUDL-4aVw

 

Lesson video

Watch the following video and do your R4 assignment. While the video demonstration below uses a Mac, both PC and Mac users will see a a very similar screen layout in R.

Lesson 4— RStudio & Histogram

 

Here are the arguments (inputs) to include in the command hist():

name of vector — name of object which you have created to store the data values

main — Title for the plot

xlab — Label for the x axis

Don’t forget to separate the arguments with comma!

 

-END-



Content is copyright the author. Layout is copyright Mark Ciotola. See Corsbook.com for further notices.