Introduction to Statistics (MAT/SST 115.03 2008S)
Primary: [Front Door] [Syllabus] [Current Outline] [R] - [Academic Honesty] [Instructions]
Groupings: [Applets] [Assignments] [Data] [Examples] [Handouts] [Labs] [Outlines] [Projects] [Readings] [Solutions]
External Links: [R Front Door] [SamR's Front Door]
We begin by reading in the file.
>TVlife = read.csv("/home/rebelsky/Stats115/Data/TVlife06.csv")
We determine the column names (and, along the way, learn a bit more about each variable).
>summary(TVlife)Country Life.Expectancy TVs.per.KAngola : 1 Min. :38.45 Min. : 5.0Australia: 1 1st Qu.:59.70 1st Qu.: 87.0Cambodia : 1 Median :70.72 Median :177.0Canada : 1 Mean :67.02 Mean :298.4China : 1 3rd Qu.:77.16 3rd Qu.:570.2Egypt : 1 Max. :81.25 Max. :844.0(Other) :16
Remember that the X variable goes first.
>cor(TVlife$TVs.per.K, TVlife$Life.Expectancy)[1] 0.7432492
Primary: [Front Door] [Syllabus] [Current Outline] [R] - [Academic Honesty] [Instructions]
Groupings: [Applets] [Assignments] [Data] [Examples] [Handouts] [Labs] [Outlines] [Projects] [Readings] [Solutions]
External Links: [R Front Door] [SamR's Front Door]
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.