Introduction to Statistics (MAT/SST 115.03 2008S)

R Notes for Topic-27 Homework Activities


Activity 27-12: Monthly Temperatures

You will need to create a data frame (or two vectors) in order to do the analysis. Here's a start.

RNCtemps = data.frame(Month=1:12, AvgTemp = c(39, 42, ...))

Activity 27-18: Solitaire

You can load the data from the file Solitaire.csv.

One nice thing about R's cor is that, when given a data frame as a parameter, it computes all the pairs of correlation coefficients.

cor(Solitaire)

Activity 27-19: Climatic Conditions

You can load the data from the file Climate.csv.

We can once again take advantage of R's willingness to compute simultaneously lots of correlation coefficients. However, this time we need to throw away one column (the city names). So, we need to coefficients for columns 2-9.

  Climate2 = Climate[,2:9]

You should be able to figure out the rest.

Creative Commons License

Samuel A. Rebelsky, rebelsky@grinnell.edu

Copyright (c) 2007-8 Samuel A. Rebelsky.

This work is licensed under a Creative Commons Attribution-NonCommercial 2.5 License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/2.5/ or send a letter to Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.