Overview

This is your first assignment; its purpose is to get you going with RStudio, the editor, and the production of Rmd/HTML documents.

Each of your assignments will lead to the creation of an Rmd file. You will hand in the HTML that is compiled from the Rmd.

To start, in your console pane, give the command to load the DCF library:

library( DCF )

Then select the FILE/NEW FILE/R Markdown … menu item. Choose “From Template” and then select the “Assignment 1” listed for the DCF package. At that point, a new editing window with the template for assignments.

  1. Save that template to the computer file system under the name AssignmentOne-XXX.Rmd (where XXX are your initials or similar unique identifier for you).
  2. Modify the author and title names.
  3. Replace the quoted string "This file.Rmd" with the name you saved the template file under. Make sure that you are using a quoted string and that you get the name exactly right, including capitalization and spacing: AssignmentOne-XXX.Rmd

Data Oriented Graphics

Find two data-oriented graphics. Using a picture of a graph in a textbook is perfectly acceptable.

  1. Give a URL link to them, or include them in the Rmd document.
  2. Describe briefly the topic the graphics apply to.
  3. Explain a plausible candidate for and the form of the data underlying the graphics.

Here are some examples drawn from Wikipedia from biochemistry and economics. You can choose whatever field is of interest to you.

Biochemistry

Economics

Schematic Graphic

Find a schematic graphic oriented toward science. Include that graphic in your document. Here are a couple of examples, drawn from Wikipedia. (Click on the image to see a full-size version.)

Biochemistry

"

Economics

File Types, Data, and Documents

Answer the following based on the notes on File Types, Data, and Documents.

Path Names

Use file.choose() in the console to find the full path name of your assignment-one Rmd file (that is, the one you are editing for this assignment). Paste the path and file name into this document.

Designing a Data Layout

Sketch on a piece of paper the data table format you would use to store data from a lab experiment where the height of some plants are being measured repeatedly over time. (You get to make up the numbers!) One possible layout is like this:

Plant Week 1 Week 2 Week 3
A 17 19 21
B 14 14 12

This layout wouldn’t be adequate if the situation were different. Imagine, for instance

  • For some plants, the measurements were made 10 days apart instead of one week apart.
  • You want to include the name of the person doing the height measurement for a given plant in each week.
  • In addition to the plant’s height, at most of the measurement times you record a number giving the level of the plant hormone IAA.1

Once you’re satisfied with your paper sketch, create the data table in a Google spreadsheet. Set the permissions on the Google spreadsheet to make it readable to anyone with the link. Put the link into your assignment write-up.

Even better, “embed” the spreadsheet in your assignment write-up.


Please use the comment system to make suggestions, point out errors, or to discuss the topic.

comments powered by Disqus


  1. You don’t need to worry about what this is.