This homework set is based on Lesson 3Boxplots. So you need to watch the video in Lesson 3 BEFORE you do this homework set.

 

I. Goal of this assignment:

Create side-by-side boxplots via the R command:

boxplot()

 

II. What to upload to Canvas for this R3 assigment?

You only need to upload ONE script only:

      • R script (.R)

— Your R script should NOT contain any prompts >.

— NO NEED to upload any result file or PDF

 

Important:

Your R script should NOT contain prompts >.  What the grader and I will do is to run your .R script on our computer to generate the boxplots. If your R script contains prompts >, it will NOT work when we run it!

The best way for you is to check if your script works or not is to do the following:

    • After you have uploaded your script to Canvas, log out of Canvas and then log back into Canvas. Download your .R script and run it on your R Console to see if it works!

 

 

III. What to do for this assignment

Create one .R script to satisfy the following requirements:

(There is only one question in this assignment.)

 

1) Come up with a quantitative variable with two sets of data.

      • Be creative! Don’t just copy my example. Come up with something DIFFERENT than the example shown in the demonstration — you will NOT receive full credit if your variable and conditions are TOO SIMILAR to mine — e.g. “plants grown under two weather conditions” or “seeds grown under two soil conditions” are TOO SIMILAR to my example!
      • Each set of data should consists of 10 to 20 data points.

 

 

2) Construct two boxplots for the two sets of data on ONE single scale.

      • That is, you create side-by-side boxplots on one single scaleno credit will be given if this requirement is not satisfied.
      • Your boxplots can be vertical or horizontal. (But don’t do both!)
      • Each of your boxplots should have 2 (not 1) whiskers.

 

3) At the top of your R script, use # to

      • type your name AND
      • type a sentence or two to describe your quantitative variable and the two conditions. Your variable can be biology-related (but they don’t have to be). Just make sure that your variable and conditions makes sense.
      • It is optional to include other information such as assignment name, etc.

 

4) To receive full credit, make sure your diagram of boxplots shows the following:

      • each boxplot has one outlier (it can be a high or low outlier)
      • each boxplot has two whiskers
      • a chart title for the entire diagram
      • labels for the horizontal and vertical axes (include unit of measurement for one of the axes)
      • a label for each boxplot (and there should NOT be “_”, an underscore in your label).

 

5) Upload your .R script to Canvas by the due date and time. No need to upload your boxplots pdf.

The video shows you how to save your boxplots diagram as a PDF so that you have a record for yourself of what you have done. However, you DO NOT need to upload your PDF into Canvas.

-END-



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