BTRY 3010 - Lab 3

BTRY 3010 - Lab 3 - Biological Statistics I Biometry 3010...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Biological Statistics I Biometry 3010 / Natural Resources 3130 / Statistical Science 2200 Lab 3 Jennifer Chung Section 401 9/26/11 Lab 3 will focus on using R scripts to organize and apply commands. Scripts are files that contain commands that can be executed in part via highlighting or as a whole in much the same way as any computer program would function. For part of this lab we will need the Class2011.txt data, so read in this file so that it is in the R environment. class = read.table("Class2011.txt",header=T,sep=",") names(Class) 1. (5 points) To create a script file in Windows to to File/New Script; on the Mac go to New Documents. A blank script file should appear. Copy and paste the following commands into the Script Program Window: stem(class$head) mean(class$head) sd(class$head) hist(class$head) Now highlight just the first line in the Script Window, and if you are using Windows version of R click on Ctrl+R; in Mac Cmd+Return. You should see the command and the solution (i.e. the stem plot or the mean head size) show up in the R Console. Try this with the other commands. (Another approach is to just place the active cursor at the end of the line and do Ctrl+R or Cmd+Return to run the line.) In order to run all the commands at once, we typically highlight the whole thing and click on Ctrl+R (Cmd Return on the Mac). Copy and paste the output solutions into the box below. Make a histogram of the data, but without the mis-measured head sizes (if there are any). To do this, do something like ClassHead = Class$Head[Class$Head > ??] # What should ?? be? hist(ClassHead)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Make the plot relatively small to save space and paper. Calculate the mean plus or minus 2 standard deviations for this data. Indicate where these are relative to the data in the histogram by placing a mark on or below the figure
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/07/2012 for the course BTRY 3010 taught by Professor Sullivan,p. during the Fall '07 term at Cornell.

Page1 / 11

BTRY 3010 - Lab 3 - Biological Statistics I Biometry 3010...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online