Banner

 

14 - Introduction to R

Skill Builders

Compute statistics for the data in the following table. Before starting, read the following boxed insert on smart editing.


year square feet electricity
2007 14,214,216 2,141,705
2008 14,359,041 2,108,088
2009 14,752,886 2,150,841
2010 15,341,886 2,211,414
2011 15,573,100 2,187,164
2012 15,740,742 2,057,364


Create a matrix with 6 rows and 3 columns containing the numbers 1 through 18.


Install the weathermetrics package and run the preceding code.


Create a CSV file of annual CO2 measurements (PPM) for 1969 through 2011 taken at the Mauna Loa Observatory.2 You should set up the file so that it contains three columns: year, month, and CO2 measurements. Read the file into R, do some basic stats, and plot year versus CO2.


Create a file with the maximum temperature for each year.

This page is part of the promotional and support material for Data Management (open edition) by Richard T. Watson
For questions and comments please contact the author

Date revised: 02-Dec-2022