date()
## [1] "Sat Sep 22 14:35:17 2012"
Due Date: September 27, 2012
Total Points: 30
1 The following ten observations, taken during the years 1970-1979, are on October snow cover for Eurasia in units of millions of square kilometers. Follow the instructions and answer questions by typing the appropriate R commands.
Year Snow
1970 6.5
1971 12.0
1972 14.9
1973 10.0
1974 10.7
1975 7.9
1976 21.9
1977 12.5
1978 14.5
1979 9.2
a. Create a data frame from these data. (2)
b. What are the mean and median snow cover over this decade? (2)
c. What is the standard deviation of the snow cover over this decade? (2)
d. How many Octobers had snow cover greater than 10 million km\( ^2 \)? (2)
a. Create a data frame from these data. (2)
S = data.frame(c(1970:1979), c(6.5, 12, 14.9, 10, 10.7, 7.9, 21.9, 12.5, 14.5,
9.2))
colnames(S) = c("Years", "Snow")
S
## Years Snow
## 1 1970 6.5
## 2 1971 12.0
## 3 1972 14.9
## 4 1973 10.0
## 5 1974 10.7
## 6 1975 7.9
## 7 1976 21.9
## 8 1977 12.5
## 9 1978 14.5
## 10 1979 9.2
b. What are the mean and median snow cover over this decade? (2)
mean(S$Snow)
## [1] 12.01
median(S$Snow)
## [1] 11.35
c. What is the standard deviation of the snow cover over this decade? (2)
sd(S$Snow)
## [1] 4.391
d. How many Octobers had snow cover greater than 10 million km\( ^2 \)? (2)
sum(S$Snow > 10)
## [1] 6
2 The data set rivers contains the lengths (miles) of 141 major rivers in North America.
a. What proportion of the rivers are shorter than 500 miles long? (2)
b. What proportion of the rivers are shorter than the mean length? (2)
c. What is the 75th percentile river length? (2)
d. What is the interquartile range in river length? (2)
require("UsingR")
## Loading required package: UsingR
## Loading required package: MASS
rivers = read.table("rivers.txt", header = TRUE)
## Warning: cannot open file 'rivers.txt': No such file or directory
## Error: cannot open the connection
a. What proportion of the rivers are shorter than 500 miles long? (2)
sum(rivers < 500)/length(rivers)
## [1] 0.5816
b. What proportion of the rivers are shorter than the mean length? (2)
(sum(rivers < mean(rivers))/length(rivers))
## [1] 0.6667
c. What is the 75th percentile river length? (2)
quantile(rivers, 0.75)
## 75%
## 680
d. What is the interquartile range in river length? (2)
IQR(rivers)
## [1] 370
3 Consider the SSN.txt file on Blackboard. The file contains monthly sunspot numbers for since 1851.
a. Read the data into R to create a data frame. (4)
b. Create a histogram of the September sunspot numbers. (2)
c. Create a scatter plot placing the June sunspot numbers on the horizontal axis and September sunspot numbers on the vertical axis. (4)
d. Use the grammar of graphics syntax to create a plot showing the September sunspot numbers on the vertical axis and the year on the horizontal axis. (4)
a. Read the data into R to create a data frame. (4)
getwd()
## [1] "/Users/luisenriqueramos/Desktop/FSU PhD/FALL 2012/GEO STATISTICS"
SSN = read.table("SSN.txt", header = TRUE)
attach(SSN)
SSN
## Year Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov
## 1 1851 75.5 105.4 64.6 56.5 62.6 63.2 36.1 57.4 67.9 62.5 51.0
## 2 1852 68.4 66.4 61.2 65.4 54.9 46.9 42.1 39.7 37.5 67.3 54.3
## 3 1853 41.1 42.9 37.7 47.6 34.7 40.0 45.9 50.4 33.5 42.3 28.8
## 4 1854 15.4 20.0 20.7 26.5 24.0 21.1 18.7 15.8 22.4 12.6 28.2
## 5 1855 12.3 11.4 17.4 4.4 9.1 5.3 0.4 3.1 0.0 9.6 4.2
## 6 1856 0.5 4.9 0.4 6.5 0.0 5.2 4.6 5.9 4.4 4.5 7.7
## 7 1857 13.7 7.4 5.2 11.1 28.6 16.0 22.2 16.9 42.4 40.6 31.4
## 8 1858 39.0 34.9 57.5 38.3 41.4 44.5 56.7 55.3 80.1 91.2 51.9
## 9 1859 83.7 87.6 90.3 85.7 91.0 87.1 95.2 106.8 105.8 114.6 97.2
## 10 1860 82.4 88.3 98.9 71.4 107.1 108.6 116.7 100.3 92.2 90.1 97.9
## 11 1861 62.3 77.7 101.0 98.5 56.8 88.1 78.0 82.5 79.9 67.2 53.7
## 12 1862 63.1 64.5 43.6 53.7 64.4 84.0 73.4 62.5 66.6 41.9 50.6
## 13 1863 48.3 56.7 66.4 40.6 53.8 40.8 32.7 48.1 22.0 39.9 37.7
## 14 1864 57.7 47.1 66.3 35.8 40.6 57.8 54.7 54.8 28.5 33.9 57.6
## 15 1865 48.7 39.3 39.5 29.4 34.5 33.6 26.8 37.8 21.6 17.1 24.6
## 16 1866 31.6 38.4 24.6 17.6 12.9 16.5 9.3 12.7 7.3 14.1 9.0
## 17 1867 0.0 0.7 9.2 5.1 2.9 1.5 5.0 4.8 9.8 13.5 9.6
## 18 1868 15.6 15.7 26.5 36.6 26.7 31.1 29.0 34.4 47.2 61.6 59.1
## 19 1869 60.9 59.9 52.7 41.0 103.9 108.4 59.2 79.6 80.6 59.3 78.1
## 20 1870 77.3 114.9 157.6 160.0 176.0 135.6 132.4 153.8 136.0 146.4 147.5
## 21 1871 88.3 125.3 143.2 162.4 145.5 91.7 103.0 110.1 80.3 89.0 105.4
## 22 1872 79.5 120.1 88.4 102.1 107.6 109.9 105.5 92.9 114.6 102.6 112.0
## 23 1873 86.7 107.0 98.3 76.2 47.9 44.8 66.9 68.2 47.1 47.1 55.4
## 24 1874 60.8 64.2 46.4 32.0 44.6 38.2 67.8 61.3 28.0 34.3 28.9
## 25 1875 14.6 21.5 33.8 29.1 11.5 23.9 12.5 14.6 2.4 12.7 17.7
## 26 1876 14.3 15.0 30.6 2.3 5.1 1.6 15.2 8.8 9.9 14.3 9.9
## 27 1877 24.4 8.7 11.9 15.8 21.6 14.2 6.0 6.3 16.9 6.7 14.2
## 28 1878 3.3 6.6 7.8 0.1 5.9 6.4 0.1 0.0 5.3 1.1 4.1
## 29 1879 1.0 0.6 0.0 6.2 2.4 4.8 7.5 10.7 6.1 12.3 13.1
## 30 1880 24.0 27.2 19.3 19.5 23.5 34.1 21.9 48.1 66.0 43.0 30.7
## 31 1881 36.4 53.2 51.5 51.6 43.5 60.5 76.9 58.4 53.2 64.4 54.8
## 32 1882 45.0 69.5 66.8 95.8 64.1 45.2 45.4 40.4 57.7 59.2 84.4
## 33 1883 60.6 46.9 42.8 82.1 31.5 76.3 80.6 46.0 52.6 83.8 84.5
## 34 1884 91.5 86.9 87.5 76.1 66.5 51.2 53.1 55.8 61.9 47.8 36.6
## 35 1885 42.8 71.8 49.8 55.0 73.0 83.7 66.5 50.0 39.6 38.7 30.9
## 36 1886 29.9 25.9 57.3 43.7 30.7 27.1 30.3 16.9 21.4 8.6 0.3
## 37 1887 10.3 13.2 4.2 6.9 20.0 15.7 23.3 21.4 7.4 6.6 6.9
## 38 1888 12.7 7.1 7.8 5.1 7.0 7.1 3.1 2.8 8.8 2.1 10.7
## 39 1889 0.8 8.5 6.7 4.3 2.4 6.4 9.4 20.6 6.5 2.1 0.2
## 40 1890 5.3 0.6 5.1 1.6 4.8 1.3 11.6 8.5 17.2 11.2 9.6
## 41 1891 13.5 22.2 10.4 20.5 41.1 48.3 58.8 33.0 53.8 51.5 41.9
## 42 1892 69.1 75.6 49.9 69.6 79.6 76.3 76.5 101.4 62.8 70.5 65.4
## 43 1893 75.0 73.0 65.7 88.1 84.7 89.9 88.6 129.2 77.9 80.0 75.1
## 44 1894 83.2 84.6 52.3 81.6 101.2 98.9 106.0 70.3 65.9 75.5 56.6
## 45 1895 63.3 67.2 61.0 76.9 67.5 71.5 47.8 68.9 57.7 67.9 47.2
## 46 1896 29.0 57.4 52.0 43.8 27.7 49.0 45.0 27.2 61.3 28.7 38.0
## 47 1897 40.6 29.4 29.1 31.0 20.0 11.3 27.6 21.8 48.1 14.3 8.4
## 48 1898 30.2 36.4 38.3 14.5 25.8 22.3 9.0 31.4 34.8 34.4 30.9
## 49 1899 19.5 9.2 18.1 14.2 7.7 20.5 13.5 2.9 8.4 13.0 7.8
## 50 1900 9.4 13.6 8.6 16.0 15.2 12.1 8.3 4.3 8.3 12.9 4.5
## 51 1901 0.2 2.4 4.5 0.0 10.2 5.8 0.7 1.0 0.6 3.7 3.8
## 52 1902 5.5 0.0 12.4 0.0 2.8 1.4 0.9 2.3 7.6 16.3 10.3
## 53 1903 8.3 17.0 13.5 26.1 14.6 16.3 27.9 28.8 11.1 38.9 44.5
## 54 1904 31.6 24.5 37.2 43.0 39.5 41.9 50.6 58.2 30.1 54.2 38.0
## 55 1905 54.8 85.8 56.5 39.3 48.0 49.0 73.0 58.8 55.0 78.7 107.2
## 56 1906 45.5 31.3 64.5 55.3 57.7 63.2 103.6 47.7 56.1 17.8 38.9
## 57 1907 76.4 108.2 60.7 52.6 42.9 40.4 49.7 54.3 85.0 65.4 61.5
## 58 1908 39.2 33.9 28.7 57.6 40.8 48.1 39.5 90.5 86.9 32.3 45.5
## 59 1909 56.7 46.6 66.3 32.3 36.0 22.6 35.8 23.1 38.8 58.4 55.8
## 60 1910 26.4 31.5 21.4 8.4 22.2 12.3 14.1 11.5 26.2 38.3 4.9
## 61 1911 3.4 9.0 7.8 16.5 9.0 2.2 3.5 4.0 4.0 2.6 4.2
## 62 1912 0.3 0.0 4.9 4.5 4.4 4.1 3.0 0.3 9.5 4.6 1.1
## 63 1913 2.3 2.9 0.5 0.9 0.0 0.0 1.7 0.2 1.2 3.1 0.7
## 64 1914 2.8 2.6 3.1 17.3 5.2 11.4 5.4 7.7 12.7 8.2 16.4
## 65 1915 23.0 42.3 38.8 41.3 33.0 68.8 71.6 69.6 49.5 53.5 42.5
## 66 1916 45.3 55.4 67.0 71.8 74.5 67.7 53.5 35.2 45.1 50.7 65.6
## 67 1917 74.7 71.9 94.8 74.7 114.1 114.9 119.8 154.5 129.4 72.2 96.4
## 68 1918 96.0 65.3 72.2 80.5 76.7 59.4 107.6 101.7 79.9 85.0 83.4
## 69 1919 48.1 79.5 66.5 51.8 88.1 111.2 64.7 69.0 54.7 52.8 42.0
## 70 1920 51.1 53.9 70.2 14.8 33.3 38.7 27.5 19.2 36.3 49.6 27.2
## 71 1921 31.5 28.3 26.7 32.4 22.2 33.7 41.9 22.8 17.8 18.2 17.8
## 72 1922 11.8 26.4 54.7 11.0 8.0 5.8 10.9 6.5 4.7 6.2 7.4
## 73 1923 4.5 1.5 3.3 6.1 3.2 9.1 3.5 0.5 13.2 11.6 10.0
## 74 1924 0.5 5.1 1.8 11.3 20.8 24.0 28.1 19.3 25.1 25.6 22.5
## 75 1925 5.5 23.2 18.0 31.7 42.8 47.5 38.5 37.9 60.2 69.2 58.6
## 76 1926 71.8 69.9 62.5 38.5 64.3 73.5 52.3 61.6 60.8 71.5 60.5
## 77 1927 81.6 93.0 69.6 93.5 79.1 59.1 54.9 53.8 68.4 63.1 67.2
## 78 1928 83.5 73.5 85.4 80.6 77.0 91.4 98.0 83.8 89.7 61.4 50.3
## 79 1929 68.9 62.8 50.2 52.8 58.2 71.9 70.2 65.8 34.4 54.0 81.1
## 80 1930 65.3 49.9 35.0 38.2 36.8 28.8 21.9 24.9 32.1 34.4 35.6
## 81 1931 14.6 43.1 30.0 31.2 24.6 15.3 17.4 13.0 19.0 10.0 18.7
## 82 1932 12.1 10.6 11.2 11.2 17.9 22.2 9.6 6.8 4.0 8.9 8.2
## 83 1933 12.3 22.2 10.1 2.9 3.2 5.2 2.8 0.2 5.1 3.0 0.6
## 84 1934 3.4 7.8 4.3 11.3 19.7 6.7 9.3 8.3 4.0 5.7 8.7
## 85 1935 18.6 20.5 23.1 12.2 27.3 45.7 33.9 30.1 42.1 53.2 64.2
## 86 1936 62.8 74.3 77.1 74.9 54.6 70.0 52.3 87.0 76.0 89.0 115.4
## 87 1937 132.5 128.5 83.9 109.3 116.7 130.3 145.1 137.7 100.7 124.9 74.4
## 88 1938 98.4 119.2 86.5 101.0 127.4 97.5 165.3 115.7 89.6 99.1 122.2
## 89 1939 80.3 77.4 64.6 109.1 118.3 101.0 97.6 105.8 112.6 88.1 68.1
## 90 1940 50.5 59.4 83.3 60.7 54.4 83.9 67.5 105.5 66.5 55.0 58.4
## 91 1941 45.6 44.5 46.4 32.8 29.5 59.8 66.9 60.0 65.9 46.3 38.4
## 92 1942 35.6 52.8 54.2 60.7 25.0 11.4 17.7 20.2 17.2 19.2 30.7
## 93 1943 12.4 28.9 27.4 26.1 14.1 7.6 13.2 19.4 10.0 7.8 10.2
## 94 1944 3.7 0.5 11.0 0.3 2.5 5.0 5.0 16.7 14.3 16.9 10.8
## 95 1945 18.5 12.7 21.5 32.0 30.6 36.2 42.6 25.9 34.9 68.8 46.0
## 96 1946 47.6 86.2 76.6 75.7 84.9 73.5 116.2 107.2 94.4 102.3 123.8
## 97 1947 115.7 133.4 129.8 149.8 201.3 163.9 157.9 188.8 169.4 163.6 128.0
## 98 1948 108.5 86.1 94.8 189.7 174.0 167.8 142.2 157.9 143.3 136.3 95.8
## 99 1949 119.1 182.3 157.5 147.0 106.2 121.7 125.8 123.8 145.3 131.6 143.5
## 100 1950 101.6 94.8 109.7 113.4 106.2 83.6 91.0 85.2 51.3 61.4 54.8
## 101 1951 59.9 59.9 55.9 92.9 108.5 100.6 61.5 61.0 83.1 51.6 52.4
## 102 1952 40.7 22.7 22.0 29.1 23.4 36.4 39.3 54.9 28.2 23.8 22.1
## 103 1953 26.5 3.9 10.0 27.8 12.5 21.8 8.6 23.5 19.3 8.2 1.6
## 104 1954 0.2 0.5 10.9 1.8 0.8 0.2 4.8 8.4 1.5 7.0 9.2
## 105 1955 23.1 20.8 4.9 11.3 28.9 31.7 26.7 40.7 42.7 58.5 89.2
## 106 1956 73.6 124.0 118.4 110.7 136.6 116.6 129.1 169.6 173.2 155.3 201.3
## 107 1957 165.0 130.2 157.4 175.2 164.6 200.7 187.2 158.0 235.8 253.8 210.9
## 108 1958 202.5 164.9 190.7 196.0 175.3 171.5 191.4 200.2 201.2 181.5 152.3
## 109 1959 217.4 143.1 185.7 163.3 172.0 168.7 149.6 199.6 145.2 111.4 124.0
## 110 1960 146.3 106.0 102.2 122.0 119.6 110.2 121.7 134.1 127.2 82.8 89.6
## 111 1961 57.9 46.1 53.0 61.4 51.0 77.4 70.2 55.8 63.6 37.7 32.6
## 112 1962 38.7 50.3 45.6 46.4 43.7 42.0 21.8 21.8 51.3 39.5 26.9
## 113 1963 19.8 24.4 17.1 29.3 43.0 35.9 19.6 33.2 38.8 35.3 23.4
## 114 1964 15.3 17.7 16.5 8.6 9.5 9.1 3.1 9.3 4.7 6.1 7.4
## 115 1965 17.5 14.2 11.7 6.8 24.1 15.9 11.9 8.9 16.8 20.1 15.8
## 116 1966 28.2 24.4 25.3 48.7 45.3 47.7 56.7 51.2 50.2 57.2 57.2
## 117 1967 110.9 93.6 111.8 69.5 86.5 67.3 91.5 107.2 76.8 88.2 94.3
## 118 1968 121.8 111.9 92.2 81.2 127.2 110.3 96.1 109.3 117.2 107.7 86.0
## 119 1969 104.4 120.5 135.8 106.8 120.0 106.0 96.8 98.0 91.3 95.7 93.5
## 120 1970 111.5 127.8 102.9 109.5 127.5 106.8 112.5 93.0 99.5 86.6 95.2
## 121 1971 91.3 79.0 60.7 71.8 57.5 49.8 81.0 61.4 50.2 51.7 63.2
## 122 1972 61.5 88.4 80.1 63.2 80.5 88.0 76.5 76.8 64.0 61.3 41.6
## 123 1973 43.4 42.9 46.0 57.7 42.4 39.5 23.1 25.6 59.3 30.7 23.9
## 124 1974 27.6 26.0 21.3 40.3 39.5 36.0 55.8 33.6 40.2 47.1 25.0
## 125 1975 18.9 11.5 11.5 5.1 9.0 11.4 28.2 39.7 13.9 9.1 19.4
## 126 1976 8.1 4.3 21.9 18.8 12.4 12.2 1.9 16.4 13.5 20.6 5.2
## 127 1977 16.4 23.1 8.7 12.9 18.6 38.5 21.4 30.1 44.0 43.8 29.1
## 128 1978 51.9 93.6 76.5 99.7 82.7 95.1 70.4 58.1 138.2 125.1 97.9
## 129 1979 166.6 137.5 138.0 101.5 134.4 149.5 159.4 142.2 188.4 186.2 183.3
## 130 1980 159.6 155.0 126.2 164.1 179.9 157.3 136.3 135.4 155.0 164.7 147.9
## 131 1981 114.0 141.3 135.5 156.4 127.5 90.9 143.8 158.7 167.3 162.4 137.5
## 132 1982 111.2 163.6 153.8 122.0 82.2 110.4 106.1 107.6 118.8 94.7 98.1
## 133 1983 84.3 51.0 66.5 80.7 99.2 91.1 82.2 71.8 50.3 55.8 33.3
## 134 1984 57.0 85.4 83.5 69.7 76.4 46.1 37.4 25.5 15.7 12.0 22.8
## 135 1985 16.5 15.9 17.2 16.2 27.5 24.2 30.7 11.1 3.9 18.6 16.2
## 136 1986 2.5 23.2 15.1 18.5 13.7 1.1 18.1 7.4 3.8 35.4 15.2
## 137 1987 10.4 2.4 14.7 39.6 33.0 17.4 33.0 38.7 33.9 60.6 39.9
## 138 1988 59.0 40.0 76.2 88.0 60.1 101.8 113.8 111.6 120.1 125.1 125.1
## 139 1989 161.3 165.1 131.4 130.6 138.5 196.2 126.9 168.9 176.7 159.4 173.0
## 140 1990 177.3 130.5 140.3 140.3 132.2 105.4 149.4 200.3 125.2 145.5 131.4
## 141 1991 136.9 167.5 141.9 140.0 121.3 169.7 173.7 176.3 125.3 144.1 108.2
## 142 1992 150.0 161.1 106.7 99.8 73.8 65.2 85.7 64.5 63.9 88.7 91.8
## 143 1993 59.3 91.0 69.8 62.2 61.3 49.8 57.9 42.2 22.4 56.4 35.6
## 144 1994 57.8 35.5 31.7 16.1 17.8 28.0 35.1 22.5 25.7 44.0 18.0
## 145 1995 24.2 29.9 31.1 14.0 14.5 15.6 14.5 14.3 11.8 21.1 9.0
## 146 1996 11.5 4.4 9.2 4.8 5.5 11.8 8.2 14.4 1.6 0.9 17.9
## 147 1997 5.7 7.6 8.7 15.5 18.5 12.7 10.4 24.4 51.3 22.8 39.0
## 148 1998 31.9 40.3 54.8 53.4 56.3 70.7 66.6 92.2 92.9 55.5 74.0
## 149 1999 62.0 66.3 68.8 63.7 106.4 137.7 113.5 93.7 71.5 116.7 133.2
## 150 2000 90.1 112.9 138.5 125.5 121.6 124.9 170.1 130.5 109.7 99.4 106.8
## 151 2001 95.6 80.6 113.5 107.7 96.6 134.0 81.8 106.4 150.7 125.5 106.5
## 152 2002 114.1 107.4 98.4 120.7 120.8 88.3 99.6 116.4 109.6 97.5 95.5
## 153 2003 79.7 46.0 61.1 60.0 54.6 77.4 83.3 72.7 48.7 65.5 67.3
## 154 2004 37.3 45.8 49.1 39.3 41.5 43.2 51.1 40.9 27.7 48.0 43.5
## 155 2005 31.3 29.2 24.5 24.2 42.7 39.3 40.1 36.4 21.9 8.7 18.0
## 156 2006 15.3 4.9 10.6 30.2 22.3 13.9 12.2 12.9 14.4 10.5 21.4
## 157 2007 16.8 10.7 4.5 3.4 11.7 12.1 9.7 6.0 2.4 0.9 1.7
## 158 2008 3.3 2.1 9.3 2.9 3.2 3.4 0.8 0.5 1.1 2.9 4.1
## 159 2009 1.3 1.4 0.7 0.8 2.9 2.9 3.2 0.0 4.3 4.6 4.2
## 160 2010 13.2 18.8 15.4 8.0 8.7 13.6 16.1 19.6 25.2 23.5 21.6
## Dec
## 1 71.4
## 2 45.4
## 3 23.4
## 4 21.6
## 5 3.1
## 6 7.2
## 7 37.2
## 8 66.9
## 9 81.0
## 10 95.6
## 11 80.5
## 12 40.9
## 13 41.2
## 14 28.6
## 15 12.8
## 16 1.5
## 17 25.2
## 18 67.6
## 19 104.3
## 20 130.0
## 21 90.4
## 22 83.9
## 23 49.2
## 24 29.3
## 25 9.9
## 26 8.2
## 27 2.2
## 28 0.5
## 29 7.3
## 30 29.6
## 31 47.3
## 32 41.8
## 33 75.9
## 34 47.2
## 35 21.7
## 36 13.0
## 37 20.7
## 38 6.7
## 39 6.7
## 40 7.8
## 41 32.5
## 42 78.6
## 43 93.8
## 44 60.0
## 45 70.7
## 46 42.6
## 47 33.3
## 48 12.6
## 49 10.5
## 50 0.3
## 51 0.0
## 52 1.1
## 53 45.6
## 54 54.6
## 55 55.5
## 56 64.7
## 57 47.3
## 58 39.5
## 59 54.2
## 60 5.8
## 61 2.2
## 62 6.4
## 63 3.8
## 64 22.3
## 65 34.5
## 66 53.0
## 67 129.3
## 68 59.2
## 69 34.9
## 70 29.9
## 71 20.3
## 72 17.5
## 73 2.8
## 74 16.5
## 75 98.6
## 76 79.4
## 77 45.2
## 78 59.0
## 79 108.0
## 80 25.8
## 81 17.8
## 82 11.0
## 83 0.3
## 84 15.4
## 85 61.5
## 86 123.4
## 87 88.8
## 88 92.7
## 89 42.1
## 90 68.3
## 91 33.7
## 92 22.5
## 93 18.8
## 94 28.4
## 95 27.4
## 96 121.7
## 97 116.5
## 98 138.0
## 99 117.6
## 100 54.1
## 101 45.8
## 102 34.3
## 103 2.5
## 104 7.6
## 105 76.9
## 106 192.1
## 107 239.4
## 108 187.6
## 109 125.0
## 110 85.6
## 111 39.9
## 112 23.2
## 113 14.9
## 114 15.1
## 115 17.0
## 116 70.4
## 117 126.4
## 118 109.8
## 119 97.9
## 120 83.5
## 121 82.2
## 122 45.3
## 123 23.3
## 124 20.5
## 125 7.8
## 126 15.3
## 127 43.2
## 128 122.7
## 129 176.3
## 130 174.4
## 131 150.1
## 132 127.0
## 133 33.4
## 134 18.7
## 135 17.3
## 136 6.8
## 137 27.1
## 138 179.2
## 139 165.5
## 140 129.7
## 141 144.4
## 142 82.6
## 143 48.9
## 144 26.2
## 145 10.0
## 146 13.3
## 147 41.2
## 148 81.9
## 149 84.6
## 150 104.4
## 151 132.2
## 152 80.8
## 153 46.5
## 154 17.9
## 155 41.1
## 156 13.6
## 157 10.1
## 158 0.8
## 159 10.6
## 160 14.5
b. Create a histogram of the September sunspot numbers. (2)
hist(SSN$Sep)
c. Create a scatter plot placing the June sunspot numbers on the horizontal axis and September sunspot numbers on the vertical axis. (4)
plot(SSN$Jun, SSN$Sep)
d. Use the grammar of graphics syntax to create a plot showing the September sunspot numbers on the vertical axis and the year on the horizontal axis. (4)
require(ggplot2)
## Loading required package: ggplot2
## Attaching package: 'ggplot2'
## The following object(s) are masked from 'package:UsingR':
##
## movies
ggplot(SSN, aes(x = Year, y = Sep)) + geom_line() + ylab("September sunspots") +
xlab("Year")