├── Programming Assignment 1 - Air Pollution ├── complete.R ├── corr.R ├── pollutantmean.R ├── rprog-data-specdata.zip ├── specdata │ ├── .Rhistory │ ├── 001.csv │ ├── 002.csv │ ├── 003.csv │ ├── 004.csv │ ├── 005.csv │ ├── 006.csv │ ├── 007.csv │ ├── 008.csv │ ├── 009.csv │ ├── 010.csv │ ├── 011.csv │ ├── 012.csv │ ├── 013.csv │ ├── 014.csv │ ├── 015.csv │ ├── 016.csv │ ├── 017.csv │ ├── 018.csv │ ├── 019.csv │ ├── 020.csv │ ├── 021.csv │ ├── 022.csv │ ├── 023.csv │ ├── 024.csv │ ├── 025.csv │ ├── 026.csv │ ├── 027.csv │ ├── 028.csv │ ├── 029.csv │ ├── 030.csv │ ├── 031.csv │ ├── 032.csv │ ├── 033.csv │ ├── 034.csv │ ├── 035.csv │ ├── 036.csv │ ├── 037.csv │ ├── 038.csv │ ├── 039.csv │ ├── 040.csv │ ├── 041.csv │ ├── 042.csv │ ├── 043.csv │ ├── 044.csv │ ├── 045.csv │ ├── 046.csv │ ├── 047.csv │ ├── 048.csv │ ├── 049.csv │ ├── 050.csv │ ├── 051.csv │ ├── 052.csv │ ├── 053.csv │ ├── 054.csv │ ├── 055.csv │ ├── 056.csv │ ├── 057.csv │ ├── 058.csv │ ├── 059.csv │ ├── 060.csv │ ├── 061.csv │ ├── 062.csv │ ├── 063.csv │ ├── 064.csv │ ├── 065.csv │ ├── 066.csv │ ├── 067.csv │ ├── 068.csv │ ├── 069.csv │ ├── 070.csv │ ├── 071.csv │ ├── 072.csv │ ├── 073.csv │ ├── 074.csv │ ├── 075.csv │ ├── 076.csv │ ├── 077.csv │ ├── 078.csv │ ├── 079.csv │ ├── 080.csv │ ├── 081.csv │ ├── 082.csv │ ├── 083.csv │ ├── 084.csv │ ├── 085.csv │ ├── 086.csv │ ├── 087.csv │ ├── 088.csv │ ├── 089.csv │ ├── 090.csv │ ├── 091.csv │ ├── 092.csv │ ├── 093.csv │ ├── 094.csv │ ├── 095.csv │ ├── 096.csv │ ├── 097.csv │ ├── 098.csv │ ├── 099.csv │ ├── 100.csv │ ├── 101.csv │ ├── 102.csv │ ├── 103.csv │ ├── 104.csv │ ├── 105.csv │ ├── 106.csv │ ├── 107.csv │ ├── 108.csv │ ├── 109.csv │ ├── 110.csv │ ├── 111.csv │ ├── 112.csv │ ├── 113.csv │ ├── 114.csv │ ├── 115.csv │ ├── 116.csv │ ├── 117.csv │ ├── 118.csv │ ├── 119.csv │ ├── 120.csv │ ├── 121.csv │ ├── 122.csv │ ├── 123.csv │ ├── 124.csv │ ├── 125.csv │ ├── 126.csv │ ├── 127.csv │ ├── 128.csv │ ├── 129.csv │ ├── 130.csv │ ├── 131.csv │ ├── 132.csv │ ├── 133.csv │ ├── 134.csv │ ├── 135.csv │ ├── 136.csv │ ├── 137.csv │ ├── 138.csv │ ├── 139.csv │ ├── 140.csv │ ├── 141.csv │ ├── 142.csv │ ├── 143.csv │ ├── 144.csv │ ├── 145.csv │ ├── 146.csv │ ├── 147.csv │ ├── 148.csv │ ├── 149.csv │ ├── 150.csv │ ├── 151.csv │ ├── 152.csv │ ├── 153.csv │ ├── 154.csv │ ├── 155.csv │ ├── 156.csv │ ├── 157.csv │ ├── 158.csv │ ├── 159.csv │ ├── 160.csv │ ├── 161.csv │ ├── 162.csv │ ├── 163.csv │ ├── 164.csv │ ├── 165.csv │ ├── 166.csv │ ├── 167.csv │ ├── 168.csv │ ├── 169.csv │ ├── 170.csv │ ├── 171.csv │ ├── 172.csv │ ├── 173.csv │ ├── 174.csv │ ├── 175.csv │ ├── 176.csv │ ├── 177.csv │ ├── 178.csv │ ├── 179.csv │ ├── 180.csv │ ├── 181.csv │ ├── 182.csv │ ├── 183.csv │ ├── 184.csv │ ├── 185.csv │ ├── 186.csv │ ├── 187.csv │ ├── 188.csv │ ├── 189.csv │ ├── 190.csv │ ├── 191.csv │ ├── 192.csv │ ├── 193.csv │ ├── 194.csv │ ├── 195.csv │ ├── 196.csv │ ├── 197.csv │ ├── 198.csv │ ├── 199.csv │ ├── 200.csv │ ├── 201.csv │ ├── 202.csv │ ├── 203.csv │ ├── 204.csv │ ├── 205.csv │ ├── 206.csv │ ├── 207.csv │ ├── 208.csv │ ├── 209.csv │ ├── 210.csv │ ├── 211.csv │ ├── 212.csv │ ├── 213.csv │ ├── 214.csv │ ├── 215.csv │ ├── 216.csv │ ├── 217.csv │ ├── 218.csv │ ├── 219.csv │ ├── 220.csv │ ├── 221.csv │ ├── 222.csv │ ├── 223.csv │ ├── 224.csv │ ├── 225.csv │ ├── 226.csv │ ├── 227.csv │ ├── 228.csv │ ├── 229.csv │ ├── 230.csv │ ├── 231.csv │ ├── 232.csv │ ├── 233.csv │ ├── 234.csv │ ├── 235.csv │ ├── 236.csv │ ├── 237.csv │ ├── 238.csv │ ├── 239.csv │ ├── 240.csv │ ├── 241.csv │ ├── 242.csv │ ├── 243.csv │ ├── 244.csv │ ├── 245.csv │ ├── 246.csv │ ├── 247.csv │ ├── 248.csv │ ├── 249.csv │ ├── 250.csv │ ├── 251.csv │ ├── 252.csv │ ├── 253.csv │ ├── 254.csv │ ├── 255.csv │ ├── 256.csv │ ├── 257.csv │ ├── 258.csv │ ├── 259.csv │ ├── 260.csv │ ├── 261.csv │ ├── 262.csv │ ├── 263.csv │ ├── 264.csv │ ├── 265.csv │ ├── 266.csv │ ├── 267.csv │ ├── 268.csv │ ├── 269.csv │ ├── 270.csv │ ├── 271.csv │ ├── 272.csv │ ├── 273.csv │ ├── 274.csv │ ├── 275.csv │ ├── 276.csv │ ├── 277.csv │ ├── 278.csv │ ├── 279.csv │ ├── 280.csv │ ├── 281.csv │ ├── 282.csv │ ├── 283.csv │ ├── 284.csv │ ├── 285.csv │ ├── 286.csv │ ├── 287.csv │ ├── 288.csv │ ├── 289.csv │ ├── 290.csv │ ├── 291.csv │ ├── 292.csv │ ├── 293.csv │ ├── 294.csv │ ├── 295.csv │ ├── 296.csv │ ├── 297.csv │ ├── 298.csv │ ├── 299.csv │ ├── 300.csv │ ├── 301.csv │ ├── 302.csv │ ├── 303.csv │ ├── 304.csv │ ├── 305.csv │ ├── 306.csv │ ├── 307.csv │ ├── 308.csv │ ├── 309.csv │ ├── 310.csv │ ├── 311.csv │ ├── 312.csv │ ├── 313.csv │ ├── 314.csv │ ├── 315.csv │ ├── 316.csv │ ├── 317.csv │ ├── 318.csv │ ├── 319.csv │ ├── 320.csv │ ├── 321.csv │ ├── 322.csv │ ├── 323.csv │ ├── 324.csv │ ├── 325.csv │ ├── 326.csv │ ├── 327.csv │ ├── 328.csv │ ├── 329.csv │ ├── 330.csv │ ├── 331.csv │ ├── 332.csv │ ├── complete.R │ ├── corr.R │ ├── pollutantmean.R │ └── submitscript1.R └── submitscript1.R ├── Programming Assignment 2 - Lexical Scoping ├── Here's how makeVector and cachemean work.html ├── Here's how makeVector and cachemean work_files │ ├── 1.jpg │ ├── 172.jpg │ ├── 204.min.js │ ├── AAizenman.jpg │ ├── FaceShot3.jpg │ ├── IMG_5048.jpg │ ├── MathJax.js │ ├── course.css │ ├── flexjoinLastChanceModal.html.js │ ├── ga.js │ ├── header(1).js │ ├── header.html.js │ ├── header.js │ ├── headshot.png │ ├── info │ ├── jdeines.jpg │ ├── logo │ ├── readme.js │ ├── require.js │ ├── routes.js │ ├── select2.css │ ├── sidebar(1).js │ ├── sidebar.html.js │ ├── sidebar.js │ ├── signatureTrackLastChanceModal.html.js │ ├── signature_track.js │ ├── spark.forum.hg.css │ ├── spark.main.css │ ├── student-page.html.js │ ├── student-page.js │ ├── university_logo │ ├── util.js │ └── widgets.js └── cachematrix.R ├── Programming Assignment 3 - Hospital Quality ├── Submit script │ └── rprog-scripts-submitscript3.R ├── best.R ├── rankall.R ├── rankhospital.R ├── rprog-data-ProgAssignment3-data.zip ├── rprog-data-ProgAssignment3-data │ ├── .Rhistory │ ├── Hospital_Revised_Flatfiles.pdf │ ├── best.R │ ├── hospital-data.csv │ ├── outcome-of-care-measures.csv │ ├── rankall.R │ ├── rankhospital.R │ └── submitscript3.R └── rprog-doc-ProgAssignment3.pdf ├── README.md └── swirl Programming Assignment ├── Assignment Details Coursera.html └── Assignment Details Coursera_files ├── 204.min.js ├── MathJax.js ├── course.css ├── flexjoinLastChanceModal.html.js ├── ga.js ├── header(1).js ├── header.html.js ├── header.js ├── jquery.js ├── loadOrRefreshMathJax.js ├── logo ├── readme.js ├── require.js ├── routes.js ├── sidebar(1).js ├── sidebar.html.js ├── sidebar.js ├── signatureTrackLastChanceModal.html.js ├── signature_track.js ├── spark.main.css ├── student-page.html.js ├── student-page.js ├── university_logo └── util.js /Programming Assignment 1 - Air Pollution/complete.R: -------------------------------------------------------------------------------- 1 | complete <- function(directory, id = 1:332) { 2 | ## 'directory' is a character vector of length 1 indicating 3 | ## the location of the CSV files 4 | 5 | ## 'id' is an integer vector indicating the monitor ID numbers 6 | ## to be used 7 | 8 | ## Return a data frame of the form: 9 | ## id nobs 10 | ## 1 117 11 | ## 2 1041 12 | ## ... 13 | ## where 'id' is the monitor ID number and 'nobs' is the 14 | ## number of complete cases 15 | 16 | filename <- vector(mode="character", length=length(id)) 17 | for(i in seq_along(id)) { 18 | x <- id[i] 19 | id_string <- toString(x) 20 | if (x >= 1 && x <= 9) { 21 | monitor <- paste("00", id_string, ".csv", sep="") 22 | } 23 | else if (x >= 10 && x <= 99) { 24 | id_string <- toString(x) 25 | monitor <- paste("0", id_string, ".csv", sep="") 26 | } 27 | else { 28 | id_string <- toString(x) 29 | monitor <- paste(id_string, ".csv", sep="") 30 | } 31 | filename[i] <- monitor 32 | #print(monitor) 33 | } 34 | 35 | #accumulator <- 0 36 | nobs <- vector(mode="integer", length=length(id)) 37 | for(i in seq(filename)) { 38 | airquality <- read.csv(filename[i]) 39 | good <- complete.cases(airquality) 40 | airquality <- airquality[good, ] 41 | nobs[i] <- nrow(airquality) 42 | #accumulator <- accumulator + sum(airquality[pollutant], na.rm = TRUE) 43 | } 44 | result = data.frame(id, nobs) 45 | result 46 | } -------------------------------------------------------------------------------- /Programming Assignment 1 - Air Pollution/corr.R: -------------------------------------------------------------------------------- 1 | corr <- function(directory, threshold = 0) { 2 | ## 'directory' is a character vector of length 1 indicating 3 | ## the location of the CSV files 4 | 5 | ## 'threshold' is a numeric vector of length 1 indicating the 6 | ## number of completely observed observations (on all 7 | ## variables) required to compute the correlation between 8 | ## nitrate and sulfate; the default is 0 9 | 10 | ## Return a numeric vector of correlations 11 | 12 | id = 1:332 13 | filename <- vector(mode="character", length=length(id)) 14 | for(i in seq_along(id)) { 15 | x <- id[i] 16 | id_string <- toString(x) 17 | if (x >= 1 && x <= 9) { 18 | monitor <- paste("00", id_string, ".csv", sep="") 19 | } 20 | else if (x >= 10 && x <= 99) { 21 | id_string <- toString(x) 22 | monitor <- paste("0", id_string, ".csv", sep="") 23 | } 24 | else { 25 | id_string <- toString(x) 26 | monitor <- paste(id_string, ".csv", sep="") 27 | } 28 | filename[i] <- monitor 29 | } 30 | #print(filename) 31 | 32 | #empty vector 33 | result <-vector(mode="numeric", length=0) 34 | for(i in seq(filename)) { 35 | airquality <- read.csv(filename[i]) 36 | good <- complete.cases(airquality) 37 | airquality <- airquality[good, ] 38 | if (nrow(airquality) > threshold) { 39 | # We need [[]] around pollutant instead of [] since airquality["sulfate"] 40 | # is a data.frame but we need a vector here. Hence, [[]]. Please note that using either 41 | #[[]] or [] gives the same results as the test cases 42 | correlation <- cor(airquality[["sulfate"]], airquality[["nitrate"]]) 43 | result <- append(result, correlation) 44 | #print(correlation) 45 | } 46 | } 47 | result 48 | } 49 | -------------------------------------------------------------------------------- /Programming Assignment 1 - Air Pollution/pollutantmean.R: -------------------------------------------------------------------------------- 1 | pollutantmean <- function(directory, pollutant, id = 1:332) { 2 | ## 'directory' is a character vector of length 1 indicating 3 | ## the location of the CSV files 4 | 5 | ## 'pollutant' is a character vector of length 1 indicating 6 | ## the name of the pollutant for which we will calculate the 7 | ## mean; either "sulfate" or "nitrate". 8 | 9 | ## 'id' is an integer vector indicating the monitor ID numbers 10 | ## to be used 11 | 12 | ## Return the mean of the pollutant across all monitors list 13 | ## in the 'id' vector (ignoring NA values) 14 | 15 | filename <- vector(mode="character", length=length(id)) 16 | for(i in seq_along(id)) { 17 | x <- id[i] 18 | id_string <- toString(x) 19 | if (x >= 1 && x <= 9) { 20 | monitor <- paste("00", id_string, ".csv", sep="") 21 | } 22 | else if (x >= 10 && x <= 99) { 23 | id_string <- toString(x) 24 | monitor <- paste("0", id_string, ".csv", sep="") 25 | } 26 | else { 27 | id_string <- toString(x) 28 | monitor <- paste(id_string, ".csv", sep="") 29 | } 30 | filename[i] <- monitor 31 | #print(monitor) 32 | } 33 | 34 | accumulator <- 0 35 | total <- 0 36 | for(i in filename) { 37 | airquality <- read.csv(i) 38 | good <- complete.cases(airquality[pollutant]) 39 | #good <- complete.cases(airquality[[pollutant]]) 40 | airquality <- airquality[good, ] 41 | total <- total + nrow(airquality) 42 | #accumulator <- accumulator + sum(airquality[pollutant], na.rm = TRUE) 43 | # We need [[]] around pollutant instead of [] since airquality[pollutant] 44 | # is a data.frame but we need a vector here. Please note that using either 45 | #[[]] or [] gives the same results as the test cases but only [[]] successfully 46 | #passes the submit() script 47 | accumulator <- accumulator + sum(airquality[[pollutant]], na.rm = TRUE) 48 | } 49 | accumulator/total 50 | } 51 | -------------------------------------------------------------------------------- /Programming Assignment 1 - Air Pollution/rprog-data-specdata.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muntasir2165/R-Programming-Assignments-1--2--and-3-/3dd6003062ddf6851a2baa06b04ed96e9eabfb60/Programming Assignment 1 - Air Pollution/rprog-data-specdata.zip -------------------------------------------------------------------------------- /Programming Assignment 1 - Air Pollution/specdata/040.csv: -------------------------------------------------------------------------------- 1 | "Date","sulfate","nitrate","ID" 2 | "2010-01-01",NA,NA,40 3 | "2010-01-02",0.653,6.6,40 4 | "2010-01-03",NA,NA,40 5 | "2010-01-04",NA,NA,40 6 | "2010-01-05",NA,NA,40 7 | "2010-01-06",NA,NA,40 8 | "2010-01-07",NA,NA,40 9 | "2010-01-08",1.13,6.86,40 10 | "2010-01-09",NA,NA,40 11 | "2010-01-10",NA,NA,40 12 | "2010-01-11",NA,NA,40 13 | "2010-01-12",NA,NA,40 14 | "2010-01-13",NA,NA,40 15 | "2010-01-14",0.488,3.93,40 16 | "2010-01-15",NA,NA,40 17 | "2010-01-16",NA,NA,40 18 | "2010-01-17",NA,NA,40 19 | "2010-01-18",NA,NA,40 20 | "2010-01-19",NA,NA,40 21 | "2010-01-20",0.243,1.88,40 22 | "2010-01-21",NA,NA,40 23 | "2010-01-22",NA,NA,40 24 | "2010-01-23",NA,NA,40 25 | "2010-01-24",NA,NA,40 26 | "2010-01-25",NA,NA,40 27 | "2010-01-26",0.615,3.34,40 28 | "2010-01-27",NA,NA,40 29 | "2010-01-28",NA,NA,40 30 | "2010-01-29",NA,NA,40 31 | "2010-01-30",NA,NA,40 32 | "2010-01-31",NA,NA,40 33 | "2010-02-01",0.511,1.91,40 34 | "2010-02-02",NA,NA,40 35 | "2010-02-03",NA,NA,40 36 | "2010-02-04",NA,NA,40 37 | "2010-02-05",NA,NA,40 38 | "2010-02-06",NA,NA,40 39 | "2010-02-07",2.11,4.56,40 40 | "2010-02-08",NA,NA,40 41 | "2010-02-09",NA,NA,40 42 | "2010-02-10",NA,NA,40 43 | "2010-02-11",NA,NA,40 44 | "2010-02-12",NA,NA,40 45 | "2010-02-13",0.403,0.283,40 46 | "2010-02-14",NA,NA,40 47 | "2010-02-15",NA,NA,40 48 | "2010-02-16",NA,NA,40 49 | "2010-02-17",1.22,2.88,40 50 | "2010-02-18",NA,NA,40 51 | "2010-02-19",NA,NA,40 52 | "2010-02-20",NA,NA,40 53 | "2010-02-21",NA,NA,40 54 | "2010-02-22",NA,NA,40 55 | "2010-02-23",NA,NA,40 56 | "2010-02-24",NA,NA,40 57 | "2010-02-25",0.787,2.84,40 58 | "2010-02-26",NA,NA,40 59 | "2010-02-27",NA,NA,40 60 | "2010-02-28",NA,NA,40 61 | "2010-03-01",NA,NA,40 62 | "2010-03-02",NA,NA,40 63 | "2010-03-03",0.815,3.81,40 64 | "2010-03-04",NA,NA,40 65 | "2010-03-05",NA,NA,40 66 | "2010-03-06",NA,NA,40 67 | "2010-03-07",NA,NA,40 68 | "2010-03-08",NA,NA,40 69 | "2010-03-09",1.12,0.688,40 70 | "2010-03-10",NA,NA,40 71 | "2010-03-11",NA,NA,40 72 | "2010-03-12",NA,NA,40 73 | "2010-03-13",NA,NA,40 74 | "2010-03-14",NA,NA,40 75 | "2010-03-15",3.27,6.5,40 76 | "2010-03-16",NA,NA,40 77 | "2010-03-17",NA,NA,40 78 | "2010-03-18",NA,NA,40 79 | "2010-03-19",NA,NA,40 80 | "2010-03-20",NA,NA,40 81 | "2010-03-21",0.573,0.321,40 82 | "2010-03-22",NA,NA,40 83 | "2010-03-23",NA,NA,40 84 | "2010-03-24",NA,NA,40 85 | "2010-03-25",NA,NA,40 86 | "2010-03-26",NA,NA,40 87 | "2010-03-27",0.543,0.345,40 88 | "2010-03-28",NA,NA,40 89 | "2010-03-29",NA,NA,40 90 | "2010-03-30",NA,NA,40 91 | "2010-03-31",NA,NA,40 92 | "2010-04-01",NA,NA,40 93 | "2010-04-02",0.372,0.255,40 94 | "2010-04-03",NA,NA,40 95 | "2010-04-04",NA,NA,40 96 | "2010-04-05",NA,NA,40 97 | "2010-04-06",NA,NA,40 98 | "2010-04-07",NA,NA,40 99 | "2010-04-08",0.727,0.623,40 100 | "2010-04-09",NA,NA,40 101 | "2010-04-10",NA,NA,40 102 | "2010-04-11",NA,NA,40 103 | "2010-04-12",NA,NA,40 104 | "2010-04-13",NA,NA,40 105 | "2010-04-14",0.809,0.296,40 106 | "2010-04-15",NA,NA,40 107 | "2010-04-16",NA,NA,40 108 | "2010-04-17",NA,NA,40 109 | "2010-04-18",NA,NA,40 110 | "2010-04-19",NA,NA,40 111 | "2010-04-20",3.04,3.04,40 112 | "2010-04-21",NA,NA,40 113 | "2010-04-22",NA,NA,40 114 | "2010-04-23",NA,NA,40 115 | "2010-04-24",NA,NA,40 116 | "2010-04-25",NA,NA,40 117 | "2010-04-26",NA,NA,40 118 | "2010-04-27",NA,NA,40 119 | "2010-04-28",NA,NA,40 120 | "2010-04-29",NA,NA,40 121 | "2010-04-30",NA,NA,40 122 | "2010-05-01",NA,NA,40 123 | "2010-05-02",NA,NA,40 124 | "2010-05-03",NA,NA,40 125 | "2010-05-04",NA,NA,40 126 | "2010-05-05",0.899,0.75,40 127 | "2010-05-06",NA,NA,40 128 | "2010-05-07",NA,NA,40 129 | "2010-05-08",0.692,1.54,40 130 | "2010-05-09",NA,NA,40 131 | "2010-05-10",NA,NA,40 132 | "2010-05-11",NA,NA,40 133 | "2010-05-12",NA,NA,40 134 | "2010-05-13",NA,NA,40 135 | "2010-05-14",NA,NA,40 136 | "2010-05-15",NA,NA,40 137 | "2010-05-16",NA,NA,40 138 | "2010-05-17",NA,NA,40 139 | "2010-05-18",NA,NA,40 140 | "2010-05-19",NA,NA,40 141 | "2010-05-20",NA,NA,40 142 | "2010-05-21",NA,NA,40 143 | "2010-05-22",NA,NA,40 144 | "2010-05-23",NA,NA,40 145 | "2010-05-24",NA,NA,40 146 | "2010-05-25",NA,NA,40 147 | "2010-05-26",NA,NA,40 148 | "2010-05-27",NA,NA,40 149 | "2010-05-28",NA,NA,40 150 | "2010-05-29",NA,NA,40 151 | "2010-05-30",NA,NA,40 152 | "2010-05-31",NA,NA,40 153 | "2010-06-01",NA,NA,40 154 | "2010-06-02",NA,NA,40 155 | "2010-06-03",NA,NA,40 156 | "2010-06-04",NA,NA,40 157 | "2010-06-05",NA,NA,40 158 | "2010-06-06",NA,NA,40 159 | "2010-06-07",NA,NA,40 160 | "2010-06-08",NA,NA,40 161 | "2010-06-09",NA,NA,40 162 | "2010-06-10",NA,NA,40 163 | "2010-06-11",NA,NA,40 164 | "2010-06-12",NA,NA,40 165 | "2010-06-13",NA,NA,40 166 | "2010-06-14",NA,NA,40 167 | "2010-06-15",NA,NA,40 168 | "2010-06-16",NA,NA,40 169 | "2010-06-17",NA,NA,40 170 | "2010-06-18",NA,NA,40 171 | "2010-06-19",NA,NA,40 172 | "2010-06-20",NA,NA,40 173 | "2010-06-21",NA,NA,40 174 | "2010-06-22",NA,NA,40 175 | "2010-06-23",NA,NA,40 176 | "2010-06-24",NA,NA,40 177 | "2010-06-25",NA,NA,40 178 | "2010-06-26",NA,NA,40 179 | "2010-06-27",NA,NA,40 180 | "2010-06-28",NA,NA,40 181 | "2010-06-29",NA,NA,40 182 | "2010-06-30",NA,NA,40 183 | "2010-07-01",NA,NA,40 184 | "2010-07-02",NA,NA,40 185 | "2010-07-03",NA,NA,40 186 | "2010-07-04",NA,NA,40 187 | "2010-07-05",NA,NA,40 188 | "2010-07-06",NA,NA,40 189 | "2010-07-07",NA,NA,40 190 | "2010-07-08",NA,NA,40 191 | "2010-07-09",NA,NA,40 192 | "2010-07-10",NA,NA,40 193 | "2010-07-11",NA,NA,40 194 | "2010-07-12",NA,NA,40 195 | "2010-07-13",NA,NA,40 196 | "2010-07-14",NA,NA,40 197 | "2010-07-15",NA,NA,40 198 | "2010-07-16",NA,NA,40 199 | "2010-07-17",NA,NA,40 200 | "2010-07-18",NA,NA,40 201 | "2010-07-19",NA,NA,40 202 | "2010-07-20",NA,NA,40 203 | "2010-07-21",NA,NA,40 204 | "2010-07-22",NA,NA,40 205 | "2010-07-23",NA,NA,40 206 | "2010-07-24",NA,NA,40 207 | "2010-07-25",NA,NA,40 208 | "2010-07-26",NA,NA,40 209 | "2010-07-27",NA,NA,40 210 | "2010-07-28",NA,NA,40 211 | "2010-07-29",NA,NA,40 212 | "2010-07-30",NA,NA,40 213 | "2010-07-31",NA,NA,40 214 | "2010-08-01",NA,NA,40 215 | "2010-08-02",NA,NA,40 216 | "2010-08-03",NA,NA,40 217 | "2010-08-04",NA,NA,40 218 | "2010-08-05",NA,NA,40 219 | "2010-08-06",NA,NA,40 220 | "2010-08-07",NA,NA,40 221 | "2010-08-08",NA,NA,40 222 | "2010-08-09",NA,NA,40 223 | "2010-08-10",NA,NA,40 224 | "2010-08-11",NA,NA,40 225 | "2010-08-12",NA,NA,40 226 | "2010-08-13",NA,NA,40 227 | "2010-08-14",NA,NA,40 228 | "2010-08-15",NA,NA,40 229 | "2010-08-16",NA,NA,40 230 | "2010-08-17",NA,NA,40 231 | "2010-08-18",NA,NA,40 232 | "2010-08-19",NA,NA,40 233 | "2010-08-20",NA,NA,40 234 | "2010-08-21",NA,NA,40 235 | "2010-08-22",NA,NA,40 236 | "2010-08-23",NA,NA,40 237 | "2010-08-24",NA,NA,40 238 | "2010-08-25",NA,NA,40 239 | "2010-08-26",NA,NA,40 240 | "2010-08-27",NA,NA,40 241 | "2010-08-28",NA,NA,40 242 | "2010-08-29",NA,NA,40 243 | "2010-08-30",NA,NA,40 244 | "2010-08-31",NA,NA,40 245 | "2010-09-01",NA,NA,40 246 | "2010-09-02",NA,NA,40 247 | "2010-09-03",NA,NA,40 248 | "2010-09-04",NA,NA,40 249 | "2010-09-05",NA,NA,40 250 | "2010-09-06",NA,NA,40 251 | "2010-09-07",NA,NA,40 252 | "2010-09-08",NA,NA,40 253 | "2010-09-09",NA,NA,40 254 | "2010-09-10",NA,NA,40 255 | "2010-09-11",NA,NA,40 256 | "2010-09-12",NA,NA,40 257 | "2010-09-13",NA,NA,40 258 | "2010-09-14",NA,NA,40 259 | "2010-09-15",NA,NA,40 260 | "2010-09-16",NA,NA,40 261 | "2010-09-17",NA,NA,40 262 | "2010-09-18",NA,NA,40 263 | "2010-09-19",NA,NA,40 264 | "2010-09-20",NA,NA,40 265 | "2010-09-21",NA,NA,40 266 | "2010-09-22",NA,NA,40 267 | "2010-09-23",NA,NA,40 268 | "2010-09-24",NA,NA,40 269 | "2010-09-25",NA,NA,40 270 | "2010-09-26",NA,NA,40 271 | "2010-09-27",NA,NA,40 272 | "2010-09-28",NA,NA,40 273 | "2010-09-29",NA,NA,40 274 | "2010-09-30",NA,NA,40 275 | "2010-10-01",NA,NA,40 276 | "2010-10-02",NA,NA,40 277 | "2010-10-03",NA,NA,40 278 | "2010-10-04",NA,NA,40 279 | "2010-10-05",NA,NA,40 280 | "2010-10-06",NA,NA,40 281 | "2010-10-07",NA,NA,40 282 | "2010-10-08",NA,NA,40 283 | "2010-10-09",NA,NA,40 284 | "2010-10-10",NA,NA,40 285 | "2010-10-11",NA,NA,40 286 | "2010-10-12",NA,NA,40 287 | "2010-10-13",NA,NA,40 288 | "2010-10-14",NA,NA,40 289 | "2010-10-15",NA,NA,40 290 | "2010-10-16",NA,NA,40 291 | "2010-10-17",NA,NA,40 292 | "2010-10-18",NA,NA,40 293 | "2010-10-19",NA,NA,40 294 | "2010-10-20",NA,NA,40 295 | "2010-10-21",NA,NA,40 296 | "2010-10-22",NA,NA,40 297 | "2010-10-23",NA,NA,40 298 | "2010-10-24",NA,NA,40 299 | "2010-10-25",NA,NA,40 300 | "2010-10-26",NA,NA,40 301 | "2010-10-27",NA,NA,40 302 | "2010-10-28",NA,NA,40 303 | "2010-10-29",NA,NA,40 304 | "2010-10-30",NA,NA,40 305 | "2010-10-31",NA,NA,40 306 | "2010-11-01",NA,NA,40 307 | "2010-11-02",NA,NA,40 308 | "2010-11-03",NA,NA,40 309 | "2010-11-04",NA,NA,40 310 | "2010-11-05",NA,NA,40 311 | "2010-11-06",NA,NA,40 312 | "2010-11-07",NA,NA,40 313 | "2010-11-08",NA,NA,40 314 | "2010-11-09",NA,NA,40 315 | "2010-11-10",NA,NA,40 316 | "2010-11-11",NA,NA,40 317 | "2010-11-12",NA,NA,40 318 | "2010-11-13",NA,NA,40 319 | "2010-11-14",NA,NA,40 320 | "2010-11-15",NA,NA,40 321 | "2010-11-16",NA,NA,40 322 | "2010-11-17",NA,NA,40 323 | "2010-11-18",NA,NA,40 324 | "2010-11-19",NA,NA,40 325 | "2010-11-20",NA,NA,40 326 | "2010-11-21",NA,NA,40 327 | "2010-11-22",NA,NA,40 328 | "2010-11-23",NA,NA,40 329 | "2010-11-24",NA,NA,40 330 | "2010-11-25",NA,NA,40 331 | "2010-11-26",NA,NA,40 332 | "2010-11-27",NA,NA,40 333 | "2010-11-28",NA,NA,40 334 | "2010-11-29",NA,NA,40 335 | "2010-11-30",NA,NA,40 336 | "2010-12-01",NA,NA,40 337 | "2010-12-02",NA,NA,40 338 | "2010-12-03",NA,NA,40 339 | "2010-12-04",NA,NA,40 340 | "2010-12-05",NA,NA,40 341 | "2010-12-06",NA,NA,40 342 | "2010-12-07",NA,NA,40 343 | "2010-12-08",NA,NA,40 344 | "2010-12-09",NA,NA,40 345 | "2010-12-10",NA,NA,40 346 | "2010-12-11",NA,NA,40 347 | "2010-12-12",NA,NA,40 348 | "2010-12-13",NA,NA,40 349 | "2010-12-14",NA,NA,40 350 | "2010-12-15",NA,NA,40 351 | "2010-12-16",NA,NA,40 352 | "2010-12-17",NA,NA,40 353 | "2010-12-18",NA,NA,40 354 | "2010-12-19",NA,NA,40 355 | "2010-12-20",NA,NA,40 356 | "2010-12-21",NA,NA,40 357 | "2010-12-22",NA,NA,40 358 | "2010-12-23",NA,NA,40 359 | "2010-12-24",NA,NA,40 360 | "2010-12-25",NA,NA,40 361 | "2010-12-26",NA,NA,40 362 | "2010-12-27",NA,NA,40 363 | "2010-12-28",NA,NA,40 364 | "2010-12-29",NA,NA,40 365 | "2010-12-30",NA,NA,40 366 | "2010-12-31",NA,NA,40 367 | -------------------------------------------------------------------------------- /Programming Assignment 1 - Air Pollution/specdata/090.csv: -------------------------------------------------------------------------------- 1 | "Date","sulfate","nitrate","ID" 2 | "2004-01-01",NA,NA,90 3 | "2004-01-02",NA,NA,90 4 | "2004-01-03",NA,NA,90 5 | "2004-01-04",1.79,2.02,90 6 | "2004-01-05",NA,NA,90 7 | "2004-01-06",NA,NA,90 8 | "2004-01-07",NA,NA,90 9 | "2004-01-08",NA,NA,90 10 | "2004-01-09",NA,NA,90 11 | "2004-01-10",NA,NA,90 12 | "2004-01-11",NA,NA,90 13 | "2004-01-12",NA,NA,90 14 | "2004-01-13",NA,NA,90 15 | "2004-01-14",NA,NA,90 16 | "2004-01-15",NA,NA,90 17 | "2004-01-16",1.01,6.04,90 18 | "2004-01-17",NA,NA,90 19 | "2004-01-18",NA,NA,90 20 | "2004-01-19",NA,NA,90 21 | "2004-01-20",NA,NA,90 22 | "2004-01-21",NA,NA,90 23 | "2004-01-22",1.04,0.962,90 24 | "2004-01-23",NA,NA,90 25 | "2004-01-24",NA,NA,90 26 | "2004-01-25",NA,NA,90 27 | "2004-01-26",NA,NA,90 28 | "2004-01-27",NA,NA,90 29 | "2004-01-28",2.26,6.6,90 30 | "2004-01-29",NA,NA,90 31 | "2004-01-30",NA,NA,90 32 | "2004-01-31",NA,NA,90 33 | "2004-02-01",NA,NA,90 34 | "2004-02-02",NA,NA,90 35 | "2004-02-03",4.57,7.6,90 36 | "2004-02-04",NA,NA,90 37 | "2004-02-05",NA,NA,90 38 | "2004-02-06",NA,NA,90 39 | "2004-02-07",NA,NA,90 40 | "2004-02-08",NA,NA,90 41 | "2004-02-09",NA,NA,90 42 | "2004-02-10",NA,NA,90 43 | "2004-02-11",NA,NA,90 44 | "2004-02-12",NA,NA,90 45 | "2004-02-13",NA,NA,90 46 | "2004-02-14",NA,NA,90 47 | "2004-02-15",0.916,0.915,90 48 | "2004-02-16",NA,NA,90 49 | "2004-02-17",NA,NA,90 50 | "2004-02-18",NA,NA,90 51 | "2004-02-19",NA,NA,90 52 | "2004-02-20",NA,NA,90 53 | "2004-02-21",2.34,1.03,90 54 | "2004-02-22",NA,NA,90 55 | "2004-02-23",NA,NA,90 56 | "2004-02-24",NA,NA,90 57 | "2004-02-25",NA,NA,90 58 | "2004-02-26",NA,NA,90 59 | "2004-02-27",3.13,10.3,90 60 | "2004-02-28",NA,NA,90 61 | "2004-02-29",NA,NA,90 62 | "2004-03-01",NA,NA,90 63 | "2004-03-02",NA,NA,90 64 | "2004-03-03",NA,NA,90 65 | "2004-03-04",4.92,11,90 66 | "2004-03-05",NA,NA,90 67 | "2004-03-06",NA,NA,90 68 | "2004-03-07",NA,NA,90 69 | "2004-03-08",NA,NA,90 70 | "2004-03-09",NA,NA,90 71 | "2004-03-10",2.85,3.39,90 72 | "2004-03-11",NA,NA,90 73 | "2004-03-12",NA,NA,90 74 | "2004-03-13",NA,NA,90 75 | "2004-03-14",NA,NA,90 76 | "2004-03-15",NA,NA,90 77 | "2004-03-16",2.64,2.89,90 78 | "2004-03-17",NA,NA,90 79 | "2004-03-18",NA,NA,90 80 | "2004-03-19",NA,NA,90 81 | "2004-03-20",NA,NA,90 82 | "2004-03-21",NA,NA,90 83 | "2004-03-22",1.79,1.6,90 84 | "2004-03-23",NA,NA,90 85 | "2004-03-24",NA,NA,90 86 | "2004-03-25",NA,NA,90 87 | "2004-03-26",NA,NA,90 88 | "2004-03-27",NA,NA,90 89 | "2004-03-28",5.39,3.19,90 90 | "2004-03-29",NA,NA,90 91 | "2004-03-30",NA,NA,90 92 | "2004-03-31",NA,NA,90 93 | "2004-04-01",NA,NA,90 94 | "2004-04-02",NA,NA,90 95 | "2004-04-03",0.736,0.623,90 96 | "2004-04-04",NA,NA,90 97 | "2004-04-05",NA,NA,90 98 | "2004-04-06",NA,NA,90 99 | "2004-04-07",NA,NA,90 100 | "2004-04-08",NA,NA,90 101 | "2004-04-09",1.84,1.78,90 102 | "2004-04-10",NA,NA,90 103 | "2004-04-11",NA,NA,90 104 | "2004-04-12",NA,NA,90 105 | "2004-04-13",NA,NA,90 106 | "2004-04-14",NA,NA,90 107 | "2004-04-15",3.12,4.88,90 108 | "2004-04-16",NA,NA,90 109 | "2004-04-17",NA,NA,90 110 | "2004-04-18",NA,NA,90 111 | "2004-04-19",NA,NA,90 112 | "2004-04-20",NA,NA,90 113 | "2004-04-21",3.1,1.37,90 114 | "2004-04-22",NA,NA,90 115 | "2004-04-23",NA,NA,90 116 | "2004-04-24",NA,NA,90 117 | "2004-04-25",NA,NA,90 118 | "2004-04-26",NA,NA,90 119 | "2004-04-27",NA,0.837,90 120 | "2004-04-28",NA,NA,90 121 | "2004-04-29",NA,NA,90 122 | "2004-04-30",NA,NA,90 123 | "2004-05-01",NA,NA,90 124 | "2004-05-02",NA,NA,90 125 | "2004-05-03",1.06,1.12,90 126 | "2004-05-04",NA,NA,90 127 | "2004-05-05",NA,NA,90 128 | "2004-05-06",NA,NA,90 129 | "2004-05-07",NA,NA,90 130 | "2004-05-08",NA,NA,90 131 | "2004-05-09",5.36,2.31,90 132 | "2004-05-10",NA,NA,90 133 | "2004-05-11",NA,NA,90 134 | "2004-05-12",NA,NA,90 135 | "2004-05-13",NA,NA,90 136 | "2004-05-14",NA,NA,90 137 | "2004-05-15",1.68,0.628,90 138 | "2004-05-16",NA,NA,90 139 | "2004-05-17",NA,NA,90 140 | "2004-05-18",NA,NA,90 141 | "2004-05-19",NA,NA,90 142 | "2004-05-20",NA,NA,90 143 | "2004-05-21",1.69,1.57,90 144 | "2004-05-22",NA,NA,90 145 | "2004-05-23",NA,NA,90 146 | "2004-05-24",NA,NA,90 147 | "2004-05-25",NA,NA,90 148 | "2004-05-26",NA,NA,90 149 | "2004-05-27",NA,2.72,90 150 | "2004-05-28",NA,NA,90 151 | "2004-05-29",NA,NA,90 152 | "2004-05-30",NA,NA,90 153 | "2004-05-31",NA,NA,90 154 | "2004-06-01",NA,NA,90 155 | "2004-06-02",1.53,0.555,90 156 | "2004-06-03",NA,NA,90 157 | "2004-06-04",NA,NA,90 158 | "2004-06-05",NA,NA,90 159 | "2004-06-06",NA,NA,90 160 | "2004-06-07",NA,NA,90 161 | "2004-06-08",6.78,0.755,90 162 | "2004-06-09",NA,NA,90 163 | "2004-06-10",NA,NA,90 164 | "2004-06-11",NA,NA,90 165 | "2004-06-12",NA,NA,90 166 | "2004-06-13",NA,NA,90 167 | "2004-06-14",1.32,0.387,90 168 | "2004-06-15",NA,NA,90 169 | "2004-06-16",NA,NA,90 170 | "2004-06-17",NA,NA,90 171 | "2004-06-18",NA,NA,90 172 | "2004-06-19",NA,NA,90 173 | "2004-06-20",1.21,0.545,90 174 | "2004-06-21",NA,NA,90 175 | "2004-06-22",NA,NA,90 176 | "2004-06-23",NA,NA,90 177 | "2004-06-24",NA,NA,90 178 | "2004-06-25",NA,NA,90 179 | "2004-06-26",1.2,1.4,90 180 | "2004-06-27",NA,NA,90 181 | "2004-06-28",NA,NA,90 182 | "2004-06-29",NA,NA,90 183 | "2004-06-30",NA,NA,90 184 | "2004-07-01",NA,NA,90 185 | "2004-07-02",8.19,1.28,90 186 | "2004-07-03",NA,NA,90 187 | "2004-07-04",NA,NA,90 188 | "2004-07-05",NA,NA,90 189 | "2004-07-06",NA,NA,90 190 | "2004-07-07",NA,NA,90 191 | "2004-07-08",1.11,0.554,90 192 | "2004-07-09",NA,NA,90 193 | "2004-07-10",NA,NA,90 194 | "2004-07-11",NA,NA,90 195 | "2004-07-12",NA,NA,90 196 | "2004-07-13",NA,NA,90 197 | "2004-07-14",1.02,0.256,90 198 | "2004-07-15",NA,NA,90 199 | "2004-07-16",NA,NA,90 200 | "2004-07-17",NA,NA,90 201 | "2004-07-18",NA,NA,90 202 | "2004-07-19",NA,NA,90 203 | "2004-07-20",6.17,0.529,90 204 | "2004-07-21",NA,NA,90 205 | "2004-07-22",NA,NA,90 206 | "2004-07-23",NA,NA,90 207 | "2004-07-24",NA,NA,90 208 | "2004-07-25",NA,NA,90 209 | "2004-07-26",1.5,0.436,90 210 | "2004-07-27",NA,NA,90 211 | "2004-07-28",NA,NA,90 212 | "2004-07-29",NA,NA,90 213 | "2004-07-30",NA,NA,90 214 | "2004-07-31",NA,NA,90 215 | "2004-08-01",4.61,1.63,90 216 | "2004-08-02",NA,NA,90 217 | "2004-08-03",NA,NA,90 218 | "2004-08-04",NA,NA,90 219 | "2004-08-05",NA,NA,90 220 | "2004-08-06",NA,NA,90 221 | "2004-08-07",1.34,0.501,90 222 | "2004-08-08",NA,NA,90 223 | "2004-08-09",NA,NA,90 224 | "2004-08-10",NA,NA,90 225 | "2004-08-11",NA,NA,90 226 | "2004-08-12",NA,NA,90 227 | "2004-08-13",0.598,0.449,90 228 | "2004-08-14",NA,NA,90 229 | "2004-08-15",NA,NA,90 230 | "2004-08-16",NA,NA,90 231 | "2004-08-17",NA,NA,90 232 | "2004-08-18",NA,NA,90 233 | "2004-08-19",1.5,0.851,90 234 | "2004-08-20",NA,NA,90 235 | "2004-08-21",NA,NA,90 236 | "2004-08-22",NA,NA,90 237 | "2004-08-23",NA,NA,90 238 | "2004-08-24",NA,NA,90 239 | "2004-08-25",2.83,0.435,90 240 | "2004-08-26",NA,NA,90 241 | "2004-08-27",NA,NA,90 242 | "2004-08-28",NA,NA,90 243 | "2004-08-29",NA,NA,90 244 | "2004-08-30",NA,NA,90 245 | "2004-08-31",3.3,0.974,90 246 | "2004-09-01",NA,NA,90 247 | "2004-09-02",NA,NA,90 248 | "2004-09-03",NA,NA,90 249 | "2004-09-04",NA,NA,90 250 | "2004-09-05",NA,NA,90 251 | "2004-09-06",NA,NA,90 252 | "2004-09-07",NA,NA,90 253 | "2004-09-08",NA,NA,90 254 | "2004-09-09",NA,NA,90 255 | "2004-09-10",NA,NA,90 256 | "2004-09-11",NA,NA,90 257 | "2004-09-12",9.92,1.04,90 258 | "2004-09-13",NA,NA,90 259 | "2004-09-14",NA,NA,90 260 | "2004-09-15",NA,NA,90 261 | "2004-09-16",NA,NA,90 262 | "2004-09-17",NA,NA,90 263 | "2004-09-18",0.926,0.454,90 264 | "2004-09-19",NA,NA,90 265 | "2004-09-20",NA,NA,90 266 | "2004-09-21",NA,NA,90 267 | "2004-09-22",NA,NA,90 268 | "2004-09-23",NA,NA,90 269 | "2004-09-24",6.19,1.05,90 270 | "2004-09-25",NA,NA,90 271 | "2004-09-26",NA,NA,90 272 | "2004-09-27",NA,NA,90 273 | "2004-09-28",NA,NA,90 274 | "2004-09-29",NA,NA,90 275 | "2004-09-30",1.27,1.22,90 276 | "2004-10-01",NA,NA,90 277 | "2004-10-02",NA,NA,90 278 | "2004-10-03",NA,NA,90 279 | "2004-10-04",NA,NA,90 280 | "2004-10-05",NA,NA,90 281 | "2004-10-06",1.13,0.891,90 282 | "2004-10-07",NA,NA,90 283 | "2004-10-08",NA,NA,90 284 | "2004-10-09",NA,NA,90 285 | "2004-10-10",NA,NA,90 286 | "2004-10-11",NA,NA,90 287 | "2004-10-12",3.89,3.42,90 288 | "2004-10-13",NA,NA,90 289 | "2004-10-14",NA,NA,90 290 | "2004-10-15",NA,NA,90 291 | "2004-10-16",NA,NA,90 292 | "2004-10-17",NA,NA,90 293 | "2004-10-18",2.21,4,90 294 | "2004-10-19",NA,NA,90 295 | "2004-10-20",NA,NA,90 296 | "2004-10-21",NA,NA,90 297 | "2004-10-22",NA,NA,90 298 | "2004-10-23",NA,NA,90 299 | "2004-10-24",1.97,1.25,90 300 | "2004-10-25",NA,NA,90 301 | "2004-10-26",NA,NA,90 302 | "2004-10-27",NA,NA,90 303 | "2004-10-28",NA,NA,90 304 | "2004-10-29",NA,NA,90 305 | "2004-10-30",2.46,0.357,90 306 | "2004-10-31",NA,NA,90 307 | "2004-11-01",NA,NA,90 308 | "2004-11-02",NA,NA,90 309 | "2004-11-03",NA,NA,90 310 | "2004-11-04",NA,NA,90 311 | "2004-11-05",0.796,0.449,90 312 | "2004-11-06",NA,NA,90 313 | "2004-11-07",NA,NA,90 314 | "2004-11-08",NA,NA,90 315 | "2004-11-09",NA,NA,90 316 | "2004-11-10",NA,NA,90 317 | "2004-11-11",1.84,0.865,90 318 | "2004-11-12",NA,NA,90 319 | "2004-11-13",NA,NA,90 320 | "2004-11-14",NA,NA,90 321 | "2004-11-15",NA,NA,90 322 | "2004-11-16",NA,NA,90 323 | "2004-11-17",4.37,7.18,90 324 | "2004-11-18",NA,NA,90 325 | "2004-11-19",NA,NA,90 326 | "2004-11-20",NA,NA,90 327 | "2004-11-21",NA,NA,90 328 | "2004-11-22",NA,NA,90 329 | "2004-11-23",4.22,6.22,90 330 | "2004-11-24",NA,NA,90 331 | "2004-11-25",NA,NA,90 332 | "2004-11-26",NA,NA,90 333 | "2004-11-27",NA,NA,90 334 | "2004-11-28",NA,NA,90 335 | "2004-11-29",2.7,4.6,90 336 | "2004-11-30",NA,NA,90 337 | "2004-12-01",NA,NA,90 338 | "2004-12-02",NA,NA,90 339 | "2004-12-03",NA,NA,90 340 | "2004-12-04",NA,NA,90 341 | "2004-12-05",1.75,6.23,90 342 | "2004-12-06",NA,NA,90 343 | "2004-12-07",NA,NA,90 344 | "2004-12-08",NA,NA,90 345 | "2004-12-09",NA,NA,90 346 | "2004-12-10",NA,NA,90 347 | "2004-12-11",1.48,0.423,90 348 | "2004-12-12",NA,NA,90 349 | "2004-12-13",NA,NA,90 350 | "2004-12-14",NA,NA,90 351 | "2004-12-15",NA,NA,90 352 | "2004-12-16",NA,NA,90 353 | "2004-12-17",1.65,1.64,90 354 | "2004-12-18",NA,NA,90 355 | "2004-12-19",NA,NA,90 356 | "2004-12-20",NA,NA,90 357 | "2004-12-21",NA,NA,90 358 | "2004-12-22",NA,NA,90 359 | "2004-12-23",1.6,1.28,90 360 | "2004-12-24",NA,NA,90 361 | "2004-12-25",NA,NA,90 362 | "2004-12-26",NA,NA,90 363 | "2004-12-27",NA,NA,90 364 | "2004-12-28",NA,NA,90 365 | "2004-12-29",4.4,14.2,90 366 | "2004-12-30",NA,NA,90 367 | "2004-12-31",NA,NA,90 368 | -------------------------------------------------------------------------------- /Programming Assignment 1 - Air Pollution/specdata/107.csv: -------------------------------------------------------------------------------- 1 | "Date","sulfate","nitrate","ID" 2 | "2001-01-01",NA,NA,107 3 | "2001-01-02",NA,NA,107 4 | "2001-01-03",NA,NA,107 5 | "2001-01-04",NA,NA,107 6 | "2001-01-05",NA,NA,107 7 | "2001-01-06",NA,NA,107 8 | "2001-01-07",NA,NA,107 9 | "2001-01-08",NA,NA,107 10 | "2001-01-09",NA,NA,107 11 | "2001-01-10",NA,NA,107 12 | "2001-01-11",NA,NA,107 13 | "2001-01-12",NA,NA,107 14 | "2001-01-13",NA,NA,107 15 | "2001-01-14",NA,NA,107 16 | "2001-01-15",NA,NA,107 17 | "2001-01-16",NA,NA,107 18 | "2001-01-17",NA,NA,107 19 | "2001-01-18",NA,NA,107 20 | "2001-01-19",NA,NA,107 21 | "2001-01-20",NA,NA,107 22 | "2001-01-21",NA,NA,107 23 | "2001-01-22",NA,NA,107 24 | "2001-01-23",NA,NA,107 25 | "2001-01-24",NA,NA,107 26 | "2001-01-25",NA,NA,107 27 | "2001-01-26",NA,NA,107 28 | "2001-01-27",NA,NA,107 29 | "2001-01-28",NA,NA,107 30 | "2001-01-29",NA,NA,107 31 | "2001-01-30",NA,NA,107 32 | "2001-01-31",NA,NA,107 33 | "2001-02-01",NA,NA,107 34 | "2001-02-02",NA,NA,107 35 | "2001-02-03",NA,NA,107 36 | "2001-02-04",NA,NA,107 37 | "2001-02-05",NA,NA,107 38 | "2001-02-06",NA,NA,107 39 | "2001-02-07",NA,NA,107 40 | "2001-02-08",NA,NA,107 41 | "2001-02-09",NA,NA,107 42 | "2001-02-10",NA,NA,107 43 | "2001-02-11",NA,NA,107 44 | "2001-02-12",NA,NA,107 45 | "2001-02-13",NA,NA,107 46 | "2001-02-14",NA,NA,107 47 | "2001-02-15",NA,NA,107 48 | "2001-02-16",NA,NA,107 49 | "2001-02-17",NA,NA,107 50 | "2001-02-18",NA,NA,107 51 | "2001-02-19",NA,NA,107 52 | "2001-02-20",NA,NA,107 53 | "2001-02-21",NA,NA,107 54 | "2001-02-22",NA,NA,107 55 | "2001-02-23",NA,NA,107 56 | "2001-02-24",NA,NA,107 57 | "2001-02-25",NA,NA,107 58 | "2001-02-26",NA,NA,107 59 | "2001-02-27",NA,NA,107 60 | "2001-02-28",NA,NA,107 61 | "2001-03-01",NA,NA,107 62 | "2001-03-02",NA,NA,107 63 | "2001-03-03",NA,NA,107 64 | "2001-03-04",NA,NA,107 65 | "2001-03-05",NA,NA,107 66 | "2001-03-06",NA,NA,107 67 | "2001-03-07",NA,NA,107 68 | "2001-03-08",NA,NA,107 69 | "2001-03-09",NA,NA,107 70 | "2001-03-10",NA,NA,107 71 | "2001-03-11",NA,NA,107 72 | "2001-03-12",NA,NA,107 73 | "2001-03-13",NA,NA,107 74 | "2001-03-14",NA,NA,107 75 | "2001-03-15",NA,NA,107 76 | "2001-03-16",NA,NA,107 77 | "2001-03-17",NA,NA,107 78 | "2001-03-18",NA,NA,107 79 | "2001-03-19",NA,NA,107 80 | "2001-03-20",NA,NA,107 81 | "2001-03-21",NA,NA,107 82 | "2001-03-22",NA,NA,107 83 | "2001-03-23",NA,NA,107 84 | "2001-03-24",NA,NA,107 85 | "2001-03-25",NA,NA,107 86 | "2001-03-26",NA,NA,107 87 | "2001-03-27",NA,NA,107 88 | "2001-03-28",NA,NA,107 89 | "2001-03-29",NA,NA,107 90 | "2001-03-30",NA,NA,107 91 | "2001-03-31",NA,NA,107 92 | "2001-04-01",NA,NA,107 93 | "2001-04-02",NA,NA,107 94 | "2001-04-03",NA,NA,107 95 | "2001-04-04",NA,NA,107 96 | "2001-04-05",NA,NA,107 97 | "2001-04-06",NA,NA,107 98 | "2001-04-07",NA,NA,107 99 | "2001-04-08",NA,NA,107 100 | "2001-04-09",NA,NA,107 101 | "2001-04-10",NA,NA,107 102 | "2001-04-11",NA,NA,107 103 | "2001-04-12",NA,NA,107 104 | "2001-04-13",NA,NA,107 105 | "2001-04-14",NA,NA,107 106 | "2001-04-15",NA,NA,107 107 | "2001-04-16",NA,NA,107 108 | "2001-04-17",NA,NA,107 109 | "2001-04-18",NA,NA,107 110 | "2001-04-19",NA,NA,107 111 | "2001-04-20",NA,NA,107 112 | "2001-04-21",NA,NA,107 113 | "2001-04-22",NA,NA,107 114 | "2001-04-23",NA,NA,107 115 | "2001-04-24",NA,NA,107 116 | "2001-04-25",NA,NA,107 117 | "2001-04-26",NA,NA,107 118 | "2001-04-27",NA,NA,107 119 | "2001-04-28",NA,NA,107 120 | "2001-04-29",NA,NA,107 121 | "2001-04-30",NA,NA,107 122 | "2001-05-01",NA,NA,107 123 | "2001-05-02",NA,NA,107 124 | "2001-05-03",NA,NA,107 125 | "2001-05-04",NA,NA,107 126 | "2001-05-05",NA,NA,107 127 | "2001-05-06",NA,NA,107 128 | "2001-05-07",NA,NA,107 129 | "2001-05-08",NA,NA,107 130 | "2001-05-09",NA,NA,107 131 | "2001-05-10",NA,NA,107 132 | "2001-05-11",NA,NA,107 133 | "2001-05-12",NA,NA,107 134 | "2001-05-13",NA,NA,107 135 | "2001-05-14",NA,NA,107 136 | "2001-05-15",NA,NA,107 137 | "2001-05-16",NA,NA,107 138 | "2001-05-17",NA,NA,107 139 | "2001-05-18",NA,NA,107 140 | "2001-05-19",NA,NA,107 141 | "2001-05-20",NA,NA,107 142 | "2001-05-21",NA,NA,107 143 | "2001-05-22",NA,NA,107 144 | "2001-05-23",NA,NA,107 145 | "2001-05-24",NA,NA,107 146 | "2001-05-25",NA,NA,107 147 | "2001-05-26",NA,NA,107 148 | "2001-05-27",NA,NA,107 149 | "2001-05-28",NA,NA,107 150 | "2001-05-29",NA,NA,107 151 | "2001-05-30",NA,NA,107 152 | "2001-05-31",NA,NA,107 153 | "2001-06-01",NA,NA,107 154 | "2001-06-02",NA,NA,107 155 | "2001-06-03",NA,NA,107 156 | "2001-06-04",NA,NA,107 157 | "2001-06-05",NA,NA,107 158 | "2001-06-06",NA,NA,107 159 | "2001-06-07",NA,NA,107 160 | "2001-06-08",NA,NA,107 161 | "2001-06-09",NA,NA,107 162 | "2001-06-10",NA,NA,107 163 | "2001-06-11",NA,NA,107 164 | "2001-06-12",NA,NA,107 165 | "2001-06-13",NA,NA,107 166 | "2001-06-14",NA,NA,107 167 | "2001-06-15",NA,NA,107 168 | "2001-06-16",NA,NA,107 169 | "2001-06-17",NA,NA,107 170 | "2001-06-18",NA,NA,107 171 | "2001-06-19",NA,NA,107 172 | "2001-06-20",NA,NA,107 173 | "2001-06-21",NA,NA,107 174 | "2001-06-22",NA,NA,107 175 | "2001-06-23",NA,NA,107 176 | "2001-06-24",NA,NA,107 177 | "2001-06-25",NA,NA,107 178 | "2001-06-26",NA,NA,107 179 | "2001-06-27",NA,NA,107 180 | "2001-06-28",NA,NA,107 181 | "2001-06-29",NA,NA,107 182 | "2001-06-30",NA,NA,107 183 | "2001-07-01",NA,NA,107 184 | "2001-07-02",NA,NA,107 185 | "2001-07-03",NA,NA,107 186 | "2001-07-04",NA,NA,107 187 | "2001-07-05",NA,NA,107 188 | "2001-07-06",NA,NA,107 189 | "2001-07-07",NA,NA,107 190 | "2001-07-08",NA,NA,107 191 | "2001-07-09",NA,NA,107 192 | "2001-07-10",NA,NA,107 193 | "2001-07-11",NA,NA,107 194 | "2001-07-12",NA,NA,107 195 | "2001-07-13",NA,NA,107 196 | "2001-07-14",NA,NA,107 197 | "2001-07-15",NA,NA,107 198 | "2001-07-16",NA,NA,107 199 | "2001-07-17",NA,NA,107 200 | "2001-07-18",NA,NA,107 201 | "2001-07-19",NA,NA,107 202 | "2001-07-20",NA,NA,107 203 | "2001-07-21",NA,NA,107 204 | "2001-07-22",NA,NA,107 205 | "2001-07-23",NA,NA,107 206 | "2001-07-24",NA,NA,107 207 | "2001-07-25",NA,NA,107 208 | "2001-07-26",NA,NA,107 209 | "2001-07-27",NA,NA,107 210 | "2001-07-28",NA,NA,107 211 | "2001-07-29",NA,NA,107 212 | "2001-07-30",NA,NA,107 213 | "2001-07-31",NA,NA,107 214 | "2001-08-01",NA,NA,107 215 | "2001-08-02",NA,NA,107 216 | "2001-08-03",NA,NA,107 217 | "2001-08-04",NA,NA,107 218 | "2001-08-05",NA,NA,107 219 | "2001-08-06",NA,NA,107 220 | "2001-08-07",NA,NA,107 221 | "2001-08-08",NA,NA,107 222 | "2001-08-09",NA,NA,107 223 | "2001-08-10",NA,NA,107 224 | "2001-08-11",NA,NA,107 225 | "2001-08-12",NA,NA,107 226 | "2001-08-13",NA,NA,107 227 | "2001-08-14",NA,NA,107 228 | "2001-08-15",NA,NA,107 229 | "2001-08-16",NA,NA,107 230 | "2001-08-17",NA,NA,107 231 | "2001-08-18",NA,NA,107 232 | "2001-08-19",NA,NA,107 233 | "2001-08-20",NA,NA,107 234 | "2001-08-21",NA,NA,107 235 | "2001-08-22",NA,NA,107 236 | "2001-08-23",NA,NA,107 237 | "2001-08-24",NA,NA,107 238 | "2001-08-25",NA,NA,107 239 | "2001-08-26",NA,NA,107 240 | "2001-08-27",NA,NA,107 241 | "2001-08-28",NA,NA,107 242 | "2001-08-29",NA,NA,107 243 | "2001-08-30",NA,NA,107 244 | "2001-08-31",NA,NA,107 245 | "2001-09-01",NA,NA,107 246 | "2001-09-02",NA,NA,107 247 | "2001-09-03",NA,NA,107 248 | "2001-09-04",NA,NA,107 249 | "2001-09-05",NA,NA,107 250 | "2001-09-06",NA,NA,107 251 | "2001-09-07",NA,NA,107 252 | "2001-09-08",NA,NA,107 253 | "2001-09-09",NA,NA,107 254 | "2001-09-10",NA,NA,107 255 | "2001-09-11",NA,NA,107 256 | "2001-09-12",NA,NA,107 257 | "2001-09-13",NA,NA,107 258 | "2001-09-14",NA,NA,107 259 | "2001-09-15",NA,NA,107 260 | "2001-09-16",NA,NA,107 261 | "2001-09-17",NA,NA,107 262 | "2001-09-18",NA,NA,107 263 | "2001-09-19",NA,NA,107 264 | "2001-09-20",NA,NA,107 265 | "2001-09-21",NA,NA,107 266 | "2001-09-22",NA,NA,107 267 | "2001-09-23",NA,NA,107 268 | "2001-09-24",NA,NA,107 269 | "2001-09-25",NA,NA,107 270 | "2001-09-26",NA,NA,107 271 | "2001-09-27",NA,NA,107 272 | "2001-09-28",NA,NA,107 273 | "2001-09-29",NA,NA,107 274 | "2001-09-30",NA,NA,107 275 | "2001-10-01",NA,NA,107 276 | "2001-10-02",NA,NA,107 277 | "2001-10-03",NA,NA,107 278 | "2001-10-04",NA,NA,107 279 | "2001-10-05",NA,NA,107 280 | "2001-10-06",NA,NA,107 281 | "2001-10-07",NA,NA,107 282 | "2001-10-08",NA,NA,107 283 | "2001-10-09",NA,NA,107 284 | "2001-10-10",NA,NA,107 285 | "2001-10-11",NA,NA,107 286 | "2001-10-12",NA,NA,107 287 | "2001-10-13",NA,NA,107 288 | "2001-10-14",NA,NA,107 289 | "2001-10-15",NA,NA,107 290 | "2001-10-16",NA,NA,107 291 | "2001-10-17",NA,NA,107 292 | "2001-10-18",NA,NA,107 293 | "2001-10-19",NA,NA,107 294 | "2001-10-20",NA,NA,107 295 | "2001-10-21",NA,NA,107 296 | "2001-10-22",NA,NA,107 297 | "2001-10-23",NA,NA,107 298 | "2001-10-24",NA,NA,107 299 | "2001-10-25",NA,NA,107 300 | "2001-10-26",NA,NA,107 301 | "2001-10-27",NA,NA,107 302 | "2001-10-28",NA,NA,107 303 | "2001-10-29",NA,NA,107 304 | "2001-10-30",NA,NA,107 305 | "2001-10-31",NA,NA,107 306 | "2001-11-01",NA,NA,107 307 | "2001-11-02",NA,NA,107 308 | "2001-11-03",NA,NA,107 309 | "2001-11-04",NA,NA,107 310 | "2001-11-05",NA,NA,107 311 | "2001-11-06",NA,NA,107 312 | "2001-11-07",NA,NA,107 313 | "2001-11-08",NA,NA,107 314 | "2001-11-09",3.3,1.56,107 315 | "2001-11-10",NA,NA,107 316 | "2001-11-11",NA,NA,107 317 | "2001-11-12",NA,NA,107 318 | "2001-11-13",NA,NA,107 319 | "2001-11-14",NA,NA,107 320 | "2001-11-15",6.34,1.88,107 321 | "2001-11-16",NA,NA,107 322 | "2001-11-17",NA,NA,107 323 | "2001-11-18",NA,NA,107 324 | "2001-11-19",NA,NA,107 325 | "2001-11-20",NA,NA,107 326 | "2001-11-21",1.68,2.13,107 327 | "2001-11-22",NA,NA,107 328 | "2001-11-23",NA,NA,107 329 | "2001-11-24",NA,NA,107 330 | "2001-11-25",NA,NA,107 331 | "2001-11-26",NA,NA,107 332 | "2001-11-27",NA,NA,107 333 | "2001-11-28",NA,NA,107 334 | "2001-11-29",NA,NA,107 335 | "2001-11-30",NA,NA,107 336 | "2001-12-01",NA,NA,107 337 | "2001-12-02",NA,NA,107 338 | "2001-12-03",NA,NA,107 339 | "2001-12-04",NA,NA,107 340 | "2001-12-05",NA,NA,107 341 | "2001-12-06",NA,NA,107 342 | "2001-12-07",NA,NA,107 343 | "2001-12-08",NA,NA,107 344 | "2001-12-09",3.7,8.86,107 345 | "2001-12-10",NA,NA,107 346 | "2001-12-11",NA,NA,107 347 | "2001-12-12",NA,NA,107 348 | "2001-12-13",NA,NA,107 349 | "2001-12-14",NA,NA,107 350 | "2001-12-15",3.55,1.29,107 351 | "2001-12-16",NA,NA,107 352 | "2001-12-17",NA,NA,107 353 | "2001-12-18",NA,NA,107 354 | "2001-12-19",NA,NA,107 355 | "2001-12-20",NA,NA,107 356 | "2001-12-21",2.03,1.52,107 357 | "2001-12-22",NA,NA,107 358 | "2001-12-23",NA,NA,107 359 | "2001-12-24",NA,NA,107 360 | "2001-12-25",NA,NA,107 361 | "2001-12-26",NA,NA,107 362 | "2001-12-27",3.2,3.9,107 363 | "2001-12-28",NA,NA,107 364 | "2001-12-29",NA,NA,107 365 | "2001-12-30",NA,NA,107 366 | "2001-12-31",NA,NA,107 367 | -------------------------------------------------------------------------------- /Programming Assignment 1 - Air Pollution/specdata/118.csv: -------------------------------------------------------------------------------- 1 | "Date","sulfate","nitrate","ID" 2 | "2001-01-01",NA,NA,118 3 | "2001-01-02",NA,NA,118 4 | "2001-01-03",NA,NA,118 5 | "2001-01-04",NA,NA,118 6 | "2001-01-05",NA,NA,118 7 | "2001-01-06",NA,NA,118 8 | "2001-01-07",NA,NA,118 9 | "2001-01-08",NA,NA,118 10 | "2001-01-09",NA,NA,118 11 | "2001-01-10",NA,NA,118 12 | "2001-01-11",NA,NA,118 13 | "2001-01-12",NA,NA,118 14 | "2001-01-13",NA,NA,118 15 | "2001-01-14",NA,NA,118 16 | "2001-01-15",NA,NA,118 17 | "2001-01-16",NA,NA,118 18 | "2001-01-17",NA,NA,118 19 | "2001-01-18",NA,NA,118 20 | "2001-01-19",NA,NA,118 21 | "2001-01-20",NA,NA,118 22 | "2001-01-21",NA,NA,118 23 | "2001-01-22",NA,NA,118 24 | "2001-01-23",NA,NA,118 25 | "2001-01-24",NA,NA,118 26 | "2001-01-25",NA,NA,118 27 | "2001-01-26",NA,NA,118 28 | "2001-01-27",NA,NA,118 29 | "2001-01-28",NA,NA,118 30 | "2001-01-29",NA,NA,118 31 | "2001-01-30",NA,NA,118 32 | "2001-01-31",NA,NA,118 33 | "2001-02-01",NA,NA,118 34 | "2001-02-02",NA,NA,118 35 | "2001-02-03",NA,NA,118 36 | "2001-02-04",NA,NA,118 37 | "2001-02-05",NA,NA,118 38 | "2001-02-06",NA,NA,118 39 | "2001-02-07",NA,NA,118 40 | "2001-02-08",NA,NA,118 41 | "2001-02-09",NA,NA,118 42 | "2001-02-10",NA,NA,118 43 | "2001-02-11",NA,NA,118 44 | "2001-02-12",NA,NA,118 45 | "2001-02-13",NA,NA,118 46 | "2001-02-14",NA,NA,118 47 | "2001-02-15",NA,NA,118 48 | "2001-02-16",NA,NA,118 49 | "2001-02-17",NA,NA,118 50 | "2001-02-18",NA,NA,118 51 | "2001-02-19",NA,NA,118 52 | "2001-02-20",NA,NA,118 53 | "2001-02-21",NA,NA,118 54 | "2001-02-22",NA,NA,118 55 | "2001-02-23",NA,NA,118 56 | "2001-02-24",NA,NA,118 57 | "2001-02-25",NA,NA,118 58 | "2001-02-26",NA,NA,118 59 | "2001-02-27",NA,NA,118 60 | "2001-02-28",NA,NA,118 61 | "2001-03-01",NA,NA,118 62 | "2001-03-02",NA,NA,118 63 | "2001-03-03",NA,NA,118 64 | "2001-03-04",NA,NA,118 65 | "2001-03-05",NA,NA,118 66 | "2001-03-06",NA,NA,118 67 | "2001-03-07",NA,NA,118 68 | "2001-03-08",NA,NA,118 69 | "2001-03-09",NA,NA,118 70 | "2001-03-10",NA,NA,118 71 | "2001-03-11",NA,NA,118 72 | "2001-03-12",NA,NA,118 73 | "2001-03-13",NA,NA,118 74 | "2001-03-14",NA,NA,118 75 | "2001-03-15",NA,NA,118 76 | "2001-03-16",NA,NA,118 77 | "2001-03-17",NA,NA,118 78 | "2001-03-18",NA,NA,118 79 | "2001-03-19",NA,NA,118 80 | "2001-03-20",NA,NA,118 81 | "2001-03-21",NA,NA,118 82 | "2001-03-22",NA,NA,118 83 | "2001-03-23",NA,NA,118 84 | "2001-03-24",NA,NA,118 85 | "2001-03-25",NA,NA,118 86 | "2001-03-26",NA,NA,118 87 | "2001-03-27",NA,NA,118 88 | "2001-03-28",NA,NA,118 89 | "2001-03-29",NA,NA,118 90 | "2001-03-30",NA,NA,118 91 | "2001-03-31",NA,NA,118 92 | "2001-04-01",NA,NA,118 93 | "2001-04-02",NA,NA,118 94 | "2001-04-03",NA,NA,118 95 | "2001-04-04",NA,NA,118 96 | "2001-04-05",NA,NA,118 97 | "2001-04-06",NA,NA,118 98 | "2001-04-07",NA,NA,118 99 | "2001-04-08",NA,NA,118 100 | "2001-04-09",NA,NA,118 101 | "2001-04-10",NA,NA,118 102 | "2001-04-11",NA,NA,118 103 | "2001-04-12",NA,NA,118 104 | "2001-04-13",NA,NA,118 105 | "2001-04-14",NA,NA,118 106 | "2001-04-15",NA,NA,118 107 | "2001-04-16",NA,NA,118 108 | "2001-04-17",NA,NA,118 109 | "2001-04-18",NA,NA,118 110 | "2001-04-19",NA,NA,118 111 | "2001-04-20",NA,NA,118 112 | "2001-04-21",NA,NA,118 113 | "2001-04-22",NA,NA,118 114 | "2001-04-23",NA,NA,118 115 | "2001-04-24",NA,NA,118 116 | "2001-04-25",NA,NA,118 117 | "2001-04-26",NA,NA,118 118 | "2001-04-27",NA,NA,118 119 | "2001-04-28",NA,NA,118 120 | "2001-04-29",NA,NA,118 121 | "2001-04-30",NA,NA,118 122 | "2001-05-01",NA,NA,118 123 | "2001-05-02",NA,NA,118 124 | "2001-05-03",NA,NA,118 125 | "2001-05-04",NA,NA,118 126 | "2001-05-05",NA,NA,118 127 | "2001-05-06",NA,NA,118 128 | "2001-05-07",NA,NA,118 129 | "2001-05-08",NA,NA,118 130 | "2001-05-09",NA,NA,118 131 | "2001-05-10",NA,NA,118 132 | "2001-05-11",NA,NA,118 133 | "2001-05-12",NA,NA,118 134 | "2001-05-13",NA,NA,118 135 | "2001-05-14",NA,NA,118 136 | "2001-05-15",NA,NA,118 137 | "2001-05-16",NA,NA,118 138 | "2001-05-17",NA,NA,118 139 | "2001-05-18",NA,NA,118 140 | "2001-05-19",NA,NA,118 141 | "2001-05-20",NA,NA,118 142 | "2001-05-21",NA,NA,118 143 | "2001-05-22",NA,NA,118 144 | "2001-05-23",NA,NA,118 145 | "2001-05-24",NA,NA,118 146 | "2001-05-25",NA,NA,118 147 | "2001-05-26",NA,NA,118 148 | "2001-05-27",NA,NA,118 149 | "2001-05-28",NA,NA,118 150 | "2001-05-29",NA,NA,118 151 | "2001-05-30",NA,NA,118 152 | "2001-05-31",NA,NA,118 153 | "2001-06-01",NA,NA,118 154 | "2001-06-02",NA,NA,118 155 | "2001-06-03",NA,NA,118 156 | "2001-06-04",NA,NA,118 157 | "2001-06-05",NA,NA,118 158 | "2001-06-06",NA,NA,118 159 | "2001-06-07",NA,NA,118 160 | "2001-06-08",NA,NA,118 161 | "2001-06-09",NA,NA,118 162 | "2001-06-10",NA,NA,118 163 | "2001-06-11",NA,NA,118 164 | "2001-06-12",NA,NA,118 165 | "2001-06-13",NA,NA,118 166 | "2001-06-14",NA,NA,118 167 | "2001-06-15",NA,NA,118 168 | "2001-06-16",NA,NA,118 169 | "2001-06-17",NA,NA,118 170 | "2001-06-18",NA,NA,118 171 | "2001-06-19",NA,NA,118 172 | "2001-06-20",NA,NA,118 173 | "2001-06-21",NA,NA,118 174 | "2001-06-22",NA,NA,118 175 | "2001-06-23",NA,NA,118 176 | "2001-06-24",NA,NA,118 177 | "2001-06-25",NA,NA,118 178 | "2001-06-26",NA,NA,118 179 | "2001-06-27",NA,NA,118 180 | "2001-06-28",NA,NA,118 181 | "2001-06-29",NA,NA,118 182 | "2001-06-30",6.35,0.521,118 183 | "2001-07-01",NA,NA,118 184 | "2001-07-02",NA,NA,118 185 | "2001-07-03",NA,NA,118 186 | "2001-07-04",NA,NA,118 187 | "2001-07-05",NA,NA,118 188 | "2001-07-06",NA,NA,118 189 | "2001-07-07",NA,NA,118 190 | "2001-07-08",NA,NA,118 191 | "2001-07-09",NA,NA,118 192 | "2001-07-10",4.31,0.167,118 193 | "2001-07-11",NA,NA,118 194 | "2001-07-12",7.26,1.28,118 195 | "2001-07-13",NA,NA,118 196 | "2001-07-14",NA,NA,118 197 | "2001-07-15",NA,NA,118 198 | "2001-07-16",11.2,0.527,118 199 | "2001-07-17",NA,NA,118 200 | "2001-07-18",9.28,1.93,118 201 | "2001-07-19",NA,NA,118 202 | "2001-07-20",3.19,0.416,118 203 | "2001-07-21",NA,NA,118 204 | "2001-07-22",4.39,0.879,118 205 | "2001-07-23",NA,NA,118 206 | "2001-07-24",4.9,0.534,118 207 | "2001-07-25",NA,NA,118 208 | "2001-07-26",1.44,0.593,118 209 | "2001-07-27",NA,NA,118 210 | "2001-07-28",1.07,0.487,118 211 | "2001-07-29",NA,NA,118 212 | "2001-07-30",5.58,0.746,118 213 | "2001-07-31",NA,NA,118 214 | "2001-08-01",2.68,0.54,118 215 | "2001-08-02",NA,NA,118 216 | "2001-08-03",NA,NA,118 217 | "2001-08-04",NA,NA,118 218 | "2001-08-05",NA,NA,118 219 | "2001-08-06",NA,NA,118 220 | "2001-08-07",NA,NA,118 221 | "2001-08-08",NA,NA,118 222 | "2001-08-09",NA,NA,118 223 | "2001-08-10",NA,NA,118 224 | "2001-08-11",NA,NA,118 225 | "2001-08-12",NA,NA,118 226 | "2001-08-13",NA,NA,118 227 | "2001-08-14",NA,NA,118 228 | "2001-08-15",NA,NA,118 229 | "2001-08-16",NA,NA,118 230 | "2001-08-17",NA,NA,118 231 | "2001-08-18",NA,NA,118 232 | "2001-08-19",NA,NA,118 233 | "2001-08-20",NA,NA,118 234 | "2001-08-21",NA,NA,118 235 | "2001-08-22",NA,NA,118 236 | "2001-08-23",NA,NA,118 237 | "2001-08-24",NA,NA,118 238 | "2001-08-25",NA,NA,118 239 | "2001-08-26",NA,NA,118 240 | "2001-08-27",NA,NA,118 241 | "2001-08-28",NA,NA,118 242 | "2001-08-29",NA,NA,118 243 | "2001-08-30",NA,NA,118 244 | "2001-08-31",NA,NA,118 245 | "2001-09-01",NA,NA,118 246 | "2001-09-02",NA,NA,118 247 | "2001-09-03",NA,NA,118 248 | "2001-09-04",NA,NA,118 249 | "2001-09-05",NA,NA,118 250 | "2001-09-06",NA,NA,118 251 | "2001-09-07",NA,NA,118 252 | "2001-09-08",NA,NA,118 253 | "2001-09-09",NA,NA,118 254 | "2001-09-10",NA,NA,118 255 | "2001-09-11",NA,NA,118 256 | "2001-09-12",NA,NA,118 257 | "2001-09-13",NA,NA,118 258 | "2001-09-14",NA,NA,118 259 | "2001-09-15",NA,NA,118 260 | "2001-09-16",NA,NA,118 261 | "2001-09-17",NA,NA,118 262 | "2001-09-18",NA,NA,118 263 | "2001-09-19",NA,NA,118 264 | "2001-09-20",NA,NA,118 265 | "2001-09-21",NA,NA,118 266 | "2001-09-22",NA,NA,118 267 | "2001-09-23",NA,NA,118 268 | "2001-09-24",NA,NA,118 269 | "2001-09-25",NA,NA,118 270 | "2001-09-26",NA,NA,118 271 | "2001-09-27",NA,NA,118 272 | "2001-09-28",NA,NA,118 273 | "2001-09-29",NA,NA,118 274 | "2001-09-30",NA,NA,118 275 | "2001-10-01",NA,NA,118 276 | "2001-10-02",NA,NA,118 277 | "2001-10-03",NA,NA,118 278 | "2001-10-04",NA,NA,118 279 | "2001-10-05",NA,NA,118 280 | "2001-10-06",NA,NA,118 281 | "2001-10-07",NA,NA,118 282 | "2001-10-08",NA,NA,118 283 | "2001-10-09",NA,NA,118 284 | "2001-10-10",NA,NA,118 285 | "2001-10-11",NA,NA,118 286 | "2001-10-12",NA,NA,118 287 | "2001-10-13",NA,NA,118 288 | "2001-10-14",NA,NA,118 289 | "2001-10-15",NA,NA,118 290 | "2001-10-16",NA,NA,118 291 | "2001-10-17",NA,NA,118 292 | "2001-10-18",NA,NA,118 293 | "2001-10-19",NA,NA,118 294 | "2001-10-20",NA,NA,118 295 | "2001-10-21",NA,NA,118 296 | "2001-10-22",NA,NA,118 297 | "2001-10-23",NA,NA,118 298 | "2001-10-24",NA,NA,118 299 | "2001-10-25",NA,NA,118 300 | "2001-10-26",NA,NA,118 301 | "2001-10-27",NA,NA,118 302 | "2001-10-28",NA,NA,118 303 | "2001-10-29",NA,NA,118 304 | "2001-10-30",NA,NA,118 305 | "2001-10-31",NA,NA,118 306 | "2001-11-01",NA,NA,118 307 | "2001-11-02",NA,NA,118 308 | "2001-11-03",NA,NA,118 309 | "2001-11-04",NA,NA,118 310 | "2001-11-05",NA,NA,118 311 | "2001-11-06",NA,NA,118 312 | "2001-11-07",NA,NA,118 313 | "2001-11-08",NA,NA,118 314 | "2001-11-09",NA,NA,118 315 | "2001-11-10",NA,NA,118 316 | "2001-11-11",NA,NA,118 317 | "2001-11-12",NA,NA,118 318 | "2001-11-13",NA,NA,118 319 | "2001-11-14",NA,NA,118 320 | "2001-11-15",NA,NA,118 321 | "2001-11-16",NA,NA,118 322 | "2001-11-17",NA,NA,118 323 | "2001-11-18",NA,NA,118 324 | "2001-11-19",NA,NA,118 325 | "2001-11-20",NA,NA,118 326 | "2001-11-21",NA,NA,118 327 | "2001-11-22",NA,NA,118 328 | "2001-11-23",NA,NA,118 329 | "2001-11-24",NA,NA,118 330 | "2001-11-25",NA,NA,118 331 | "2001-11-26",NA,NA,118 332 | "2001-11-27",NA,NA,118 333 | "2001-11-28",NA,NA,118 334 | "2001-11-29",NA,NA,118 335 | "2001-11-30",NA,NA,118 336 | "2001-12-01",NA,NA,118 337 | "2001-12-02",NA,NA,118 338 | "2001-12-03",NA,NA,118 339 | "2001-12-04",NA,NA,118 340 | "2001-12-05",NA,NA,118 341 | "2001-12-06",NA,NA,118 342 | "2001-12-07",NA,NA,118 343 | "2001-12-08",NA,NA,118 344 | "2001-12-09",NA,NA,118 345 | "2001-12-10",NA,NA,118 346 | "2001-12-11",NA,NA,118 347 | "2001-12-12",NA,NA,118 348 | "2001-12-13",NA,NA,118 349 | "2001-12-14",NA,NA,118 350 | "2001-12-15",NA,NA,118 351 | "2001-12-16",NA,NA,118 352 | "2001-12-17",NA,NA,118 353 | "2001-12-18",NA,NA,118 354 | "2001-12-19",NA,NA,118 355 | "2001-12-20",NA,NA,118 356 | "2001-12-21",NA,NA,118 357 | "2001-12-22",NA,NA,118 358 | "2001-12-23",NA,NA,118 359 | "2001-12-24",NA,NA,118 360 | "2001-12-25",NA,NA,118 361 | "2001-12-26",NA,NA,118 362 | "2001-12-27",NA,NA,118 363 | "2001-12-28",NA,NA,118 364 | "2001-12-29",NA,NA,118 365 | "2001-12-30",NA,NA,118 366 | "2001-12-31",NA,NA,118 367 | -------------------------------------------------------------------------------- /Programming Assignment 1 - Air Pollution/specdata/137.csv: -------------------------------------------------------------------------------- 1 | "Date","sulfate","nitrate","ID" 2 | "2001-01-01",NA,NA,137 3 | "2001-01-02",NA,NA,137 4 | "2001-01-03",NA,NA,137 5 | "2001-01-04",NA,NA,137 6 | "2001-01-05",NA,NA,137 7 | "2001-01-06",NA,NA,137 8 | "2001-01-07",1.73,1.19,137 9 | "2001-01-08",NA,NA,137 10 | "2001-01-09",NA,NA,137 11 | "2001-01-10",NA,NA,137 12 | "2001-01-11",NA,NA,137 13 | "2001-01-12",NA,NA,137 14 | "2001-01-13",NA,NA,137 15 | "2001-01-14",NA,NA,137 16 | "2001-01-15",NA,NA,137 17 | "2001-01-16",NA,NA,137 18 | "2001-01-17",NA,NA,137 19 | "2001-01-18",NA,NA,137 20 | "2001-01-19",NA,NA,137 21 | "2001-01-20",NA,NA,137 22 | "2001-01-21",NA,NA,137 23 | "2001-01-22",NA,NA,137 24 | "2001-01-23",NA,NA,137 25 | "2001-01-24",NA,NA,137 26 | "2001-01-25",1.01,4.85,137 27 | "2001-01-26",NA,NA,137 28 | "2001-01-27",NA,NA,137 29 | "2001-01-28",NA,NA,137 30 | "2001-01-29",NA,NA,137 31 | "2001-01-30",NA,NA,137 32 | "2001-01-31",NA,NA,137 33 | "2001-02-01",NA,NA,137 34 | "2001-02-02",NA,NA,137 35 | "2001-02-03",NA,NA,137 36 | "2001-02-04",NA,NA,137 37 | "2001-02-05",NA,NA,137 38 | "2001-02-06",NA,NA,137 39 | "2001-02-07",NA,NA,137 40 | "2001-02-08",NA,NA,137 41 | "2001-02-09",NA,NA,137 42 | "2001-02-10",NA,NA,137 43 | "2001-02-11",NA,NA,137 44 | "2001-02-12",NA,NA,137 45 | "2001-02-13",NA,NA,137 46 | "2001-02-14",NA,NA,137 47 | "2001-02-15",NA,NA,137 48 | "2001-02-16",NA,NA,137 49 | "2001-02-17",NA,NA,137 50 | "2001-02-18",NA,NA,137 51 | "2001-02-19",NA,NA,137 52 | "2001-02-20",NA,NA,137 53 | "2001-02-21",NA,NA,137 54 | "2001-02-22",NA,NA,137 55 | "2001-02-23",NA,NA,137 56 | "2001-02-24",NA,NA,137 57 | "2001-02-25",NA,NA,137 58 | "2001-02-26",NA,NA,137 59 | "2001-02-27",NA,NA,137 60 | "2001-02-28",NA,NA,137 61 | "2001-03-01",NA,NA,137 62 | "2001-03-02",NA,NA,137 63 | "2001-03-03",NA,NA,137 64 | "2001-03-04",NA,NA,137 65 | "2001-03-05",NA,NA,137 66 | "2001-03-06",NA,NA,137 67 | "2001-03-07",NA,NA,137 68 | "2001-03-08",NA,NA,137 69 | "2001-03-09",NA,NA,137 70 | "2001-03-10",NA,NA,137 71 | "2001-03-11",NA,NA,137 72 | "2001-03-12",NA,NA,137 73 | "2001-03-13",NA,NA,137 74 | "2001-03-14",NA,NA,137 75 | "2001-03-15",NA,NA,137 76 | "2001-03-16",NA,NA,137 77 | "2001-03-17",NA,NA,137 78 | "2001-03-18",NA,NA,137 79 | "2001-03-19",NA,NA,137 80 | "2001-03-20",NA,NA,137 81 | "2001-03-21",NA,NA,137 82 | "2001-03-22",NA,NA,137 83 | "2001-03-23",NA,NA,137 84 | "2001-03-24",NA,NA,137 85 | "2001-03-25",NA,NA,137 86 | "2001-03-26",NA,NA,137 87 | "2001-03-27",NA,NA,137 88 | "2001-03-28",NA,NA,137 89 | "2001-03-29",NA,NA,137 90 | "2001-03-30",NA,NA,137 91 | "2001-03-31",NA,NA,137 92 | "2001-04-01",NA,NA,137 93 | "2001-04-02",NA,NA,137 94 | "2001-04-03",NA,NA,137 95 | "2001-04-04",NA,NA,137 96 | "2001-04-05",NA,NA,137 97 | "2001-04-06",NA,NA,137 98 | "2001-04-07",NA,NA,137 99 | "2001-04-08",NA,NA,137 100 | "2001-04-09",NA,NA,137 101 | "2001-04-10",NA,NA,137 102 | "2001-04-11",NA,NA,137 103 | "2001-04-12",NA,NA,137 104 | "2001-04-13",NA,NA,137 105 | "2001-04-14",NA,NA,137 106 | "2001-04-15",NA,NA,137 107 | "2001-04-16",NA,NA,137 108 | "2001-04-17",NA,NA,137 109 | "2001-04-18",NA,NA,137 110 | "2001-04-19",NA,NA,137 111 | "2001-04-20",NA,NA,137 112 | "2001-04-21",NA,NA,137 113 | "2001-04-22",NA,NA,137 114 | "2001-04-23",NA,NA,137 115 | "2001-04-24",NA,NA,137 116 | "2001-04-25",NA,NA,137 117 | "2001-04-26",NA,NA,137 118 | "2001-04-27",NA,NA,137 119 | "2001-04-28",NA,NA,137 120 | "2001-04-29",NA,NA,137 121 | "2001-04-30",NA,NA,137 122 | "2001-05-01",NA,NA,137 123 | "2001-05-02",NA,NA,137 124 | "2001-05-03",NA,NA,137 125 | "2001-05-04",NA,NA,137 126 | "2001-05-05",NA,NA,137 127 | "2001-05-06",NA,NA,137 128 | "2001-05-07",NA,NA,137 129 | "2001-05-08",NA,NA,137 130 | "2001-05-09",NA,NA,137 131 | "2001-05-10",NA,NA,137 132 | "2001-05-11",NA,NA,137 133 | "2001-05-12",NA,NA,137 134 | "2001-05-13",NA,NA,137 135 | "2001-05-14",NA,NA,137 136 | "2001-05-15",NA,NA,137 137 | "2001-05-16",NA,NA,137 138 | "2001-05-17",NA,NA,137 139 | "2001-05-18",NA,NA,137 140 | "2001-05-19",NA,NA,137 141 | "2001-05-20",NA,NA,137 142 | "2001-05-21",NA,NA,137 143 | "2001-05-22",NA,NA,137 144 | "2001-05-23",NA,NA,137 145 | "2001-05-24",NA,NA,137 146 | "2001-05-25",NA,NA,137 147 | "2001-05-26",NA,NA,137 148 | "2001-05-27",NA,NA,137 149 | "2001-05-28",NA,NA,137 150 | "2001-05-29",NA,NA,137 151 | "2001-05-30",NA,NA,137 152 | "2001-05-31",NA,NA,137 153 | "2001-06-01",NA,NA,137 154 | "2001-06-02",NA,NA,137 155 | "2001-06-03",NA,NA,137 156 | "2001-06-04",NA,NA,137 157 | "2001-06-05",NA,NA,137 158 | "2001-06-06",NA,NA,137 159 | "2001-06-07",NA,NA,137 160 | "2001-06-08",NA,NA,137 161 | "2001-06-09",NA,NA,137 162 | "2001-06-10",NA,NA,137 163 | "2001-06-11",NA,NA,137 164 | "2001-06-12",NA,NA,137 165 | "2001-06-13",NA,NA,137 166 | "2001-06-14",NA,NA,137 167 | "2001-06-15",NA,NA,137 168 | "2001-06-16",NA,NA,137 169 | "2001-06-17",NA,NA,137 170 | "2001-06-18",NA,NA,137 171 | "2001-06-19",NA,NA,137 172 | "2001-06-20",NA,NA,137 173 | "2001-06-21",NA,NA,137 174 | "2001-06-22",NA,NA,137 175 | "2001-06-23",NA,NA,137 176 | "2001-06-24",NA,NA,137 177 | "2001-06-25",NA,NA,137 178 | "2001-06-26",NA,NA,137 179 | "2001-06-27",NA,NA,137 180 | "2001-06-28",NA,NA,137 181 | "2001-06-29",NA,NA,137 182 | "2001-06-30",NA,NA,137 183 | "2001-07-01",NA,NA,137 184 | "2001-07-02",NA,NA,137 185 | "2001-07-03",NA,NA,137 186 | "2001-07-04",NA,NA,137 187 | "2001-07-05",NA,NA,137 188 | "2001-07-06",NA,NA,137 189 | "2001-07-07",NA,NA,137 190 | "2001-07-08",NA,NA,137 191 | "2001-07-09",NA,NA,137 192 | "2001-07-10",NA,NA,137 193 | "2001-07-11",NA,NA,137 194 | "2001-07-12",NA,NA,137 195 | "2001-07-13",NA,NA,137 196 | "2001-07-14",NA,NA,137 197 | "2001-07-15",NA,NA,137 198 | "2001-07-16",NA,NA,137 199 | "2001-07-17",NA,NA,137 200 | "2001-07-18",NA,NA,137 201 | "2001-07-19",NA,NA,137 202 | "2001-07-20",NA,NA,137 203 | "2001-07-21",NA,NA,137 204 | "2001-07-22",NA,NA,137 205 | "2001-07-23",NA,NA,137 206 | "2001-07-24",NA,NA,137 207 | "2001-07-25",NA,NA,137 208 | "2001-07-26",NA,NA,137 209 | "2001-07-27",NA,NA,137 210 | "2001-07-28",NA,NA,137 211 | "2001-07-29",NA,NA,137 212 | "2001-07-30",NA,NA,137 213 | "2001-07-31",NA,NA,137 214 | "2001-08-01",NA,NA,137 215 | "2001-08-02",NA,NA,137 216 | "2001-08-03",NA,NA,137 217 | "2001-08-04",NA,NA,137 218 | "2001-08-05",NA,NA,137 219 | "2001-08-06",NA,NA,137 220 | "2001-08-07",NA,NA,137 221 | "2001-08-08",NA,NA,137 222 | "2001-08-09",NA,NA,137 223 | "2001-08-10",NA,NA,137 224 | "2001-08-11",NA,NA,137 225 | "2001-08-12",NA,NA,137 226 | "2001-08-13",NA,NA,137 227 | "2001-08-14",NA,NA,137 228 | "2001-08-15",NA,NA,137 229 | "2001-08-16",NA,NA,137 230 | "2001-08-17",NA,NA,137 231 | "2001-08-18",NA,NA,137 232 | "2001-08-19",NA,NA,137 233 | "2001-08-20",NA,NA,137 234 | "2001-08-21",NA,NA,137 235 | "2001-08-22",NA,NA,137 236 | "2001-08-23",NA,NA,137 237 | "2001-08-24",NA,NA,137 238 | "2001-08-25",NA,NA,137 239 | "2001-08-26",NA,NA,137 240 | "2001-08-27",NA,NA,137 241 | "2001-08-28",NA,NA,137 242 | "2001-08-29",NA,NA,137 243 | "2001-08-30",NA,NA,137 244 | "2001-08-31",NA,NA,137 245 | "2001-09-01",NA,NA,137 246 | "2001-09-02",NA,NA,137 247 | "2001-09-03",NA,NA,137 248 | "2001-09-04",NA,NA,137 249 | "2001-09-05",NA,NA,137 250 | "2001-09-06",NA,NA,137 251 | "2001-09-07",NA,NA,137 252 | "2001-09-08",NA,NA,137 253 | "2001-09-09",NA,NA,137 254 | "2001-09-10",NA,NA,137 255 | "2001-09-11",NA,NA,137 256 | "2001-09-12",NA,NA,137 257 | "2001-09-13",NA,NA,137 258 | "2001-09-14",NA,NA,137 259 | "2001-09-15",NA,NA,137 260 | "2001-09-16",NA,NA,137 261 | "2001-09-17",NA,NA,137 262 | "2001-09-18",NA,NA,137 263 | "2001-09-19",NA,NA,137 264 | "2001-09-20",NA,NA,137 265 | "2001-09-21",NA,NA,137 266 | "2001-09-22",NA,NA,137 267 | "2001-09-23",NA,NA,137 268 | "2001-09-24",NA,NA,137 269 | "2001-09-25",NA,NA,137 270 | "2001-09-26",NA,NA,137 271 | "2001-09-27",NA,NA,137 272 | "2001-09-28",NA,NA,137 273 | "2001-09-29",NA,NA,137 274 | "2001-09-30",NA,NA,137 275 | "2001-10-01",NA,NA,137 276 | "2001-10-02",NA,NA,137 277 | "2001-10-03",NA,NA,137 278 | "2001-10-04",NA,NA,137 279 | "2001-10-05",NA,NA,137 280 | "2001-10-06",NA,NA,137 281 | "2001-10-07",NA,NA,137 282 | "2001-10-08",NA,NA,137 283 | "2001-10-09",NA,NA,137 284 | "2001-10-10",NA,NA,137 285 | "2001-10-11",NA,NA,137 286 | "2001-10-12",NA,NA,137 287 | "2001-10-13",NA,NA,137 288 | "2001-10-14",NA,NA,137 289 | "2001-10-15",NA,NA,137 290 | "2001-10-16",NA,NA,137 291 | "2001-10-17",NA,NA,137 292 | "2001-10-18",NA,NA,137 293 | "2001-10-19",NA,NA,137 294 | "2001-10-20",NA,NA,137 295 | "2001-10-21",NA,NA,137 296 | "2001-10-22",NA,NA,137 297 | "2001-10-23",NA,NA,137 298 | "2001-10-24",NA,NA,137 299 | "2001-10-25",NA,NA,137 300 | "2001-10-26",NA,NA,137 301 | "2001-10-27",NA,NA,137 302 | "2001-10-28",NA,NA,137 303 | "2001-10-29",NA,NA,137 304 | "2001-10-30",NA,NA,137 305 | "2001-10-31",NA,NA,137 306 | "2001-11-01",NA,NA,137 307 | "2001-11-02",NA,NA,137 308 | "2001-11-03",NA,NA,137 309 | "2001-11-04",NA,NA,137 310 | "2001-11-05",NA,NA,137 311 | "2001-11-06",NA,NA,137 312 | "2001-11-07",NA,NA,137 313 | "2001-11-08",NA,NA,137 314 | "2001-11-09",NA,NA,137 315 | "2001-11-10",NA,NA,137 316 | "2001-11-11",NA,NA,137 317 | "2001-11-12",NA,NA,137 318 | "2001-11-13",NA,NA,137 319 | "2001-11-14",NA,NA,137 320 | "2001-11-15",NA,NA,137 321 | "2001-11-16",NA,NA,137 322 | "2001-11-17",NA,NA,137 323 | "2001-11-18",NA,NA,137 324 | "2001-11-19",NA,NA,137 325 | "2001-11-20",NA,NA,137 326 | "2001-11-21",NA,NA,137 327 | "2001-11-22",NA,NA,137 328 | "2001-11-23",NA,NA,137 329 | "2001-11-24",NA,NA,137 330 | "2001-11-25",NA,NA,137 331 | "2001-11-26",NA,NA,137 332 | "2001-11-27",NA,NA,137 333 | "2001-11-28",NA,NA,137 334 | "2001-11-29",NA,NA,137 335 | "2001-11-30",NA,NA,137 336 | "2001-12-01",NA,NA,137 337 | "2001-12-02",NA,NA,137 338 | "2001-12-03",NA,NA,137 339 | "2001-12-04",NA,NA,137 340 | "2001-12-05",NA,NA,137 341 | "2001-12-06",NA,NA,137 342 | "2001-12-07",NA,NA,137 343 | "2001-12-08",NA,NA,137 344 | "2001-12-09",NA,NA,137 345 | "2001-12-10",NA,NA,137 346 | "2001-12-11",NA,NA,137 347 | "2001-12-12",NA,NA,137 348 | "2001-12-13",NA,NA,137 349 | "2001-12-14",NA,NA,137 350 | "2001-12-15",NA,NA,137 351 | "2001-12-16",NA,NA,137 352 | "2001-12-17",NA,NA,137 353 | "2001-12-18",NA,NA,137 354 | "2001-12-19",NA,NA,137 355 | "2001-12-20",NA,NA,137 356 | "2001-12-21",NA,NA,137 357 | "2001-12-22",NA,NA,137 358 | "2001-12-23",NA,NA,137 359 | "2001-12-24",NA,NA,137 360 | "2001-12-25",NA,NA,137 361 | "2001-12-26",NA,NA,137 362 | "2001-12-27",NA,NA,137 363 | "2001-12-28",NA,NA,137 364 | "2001-12-29",NA,NA,137 365 | "2001-12-30",NA,NA,137 366 | "2001-12-31",NA,NA,137 367 | -------------------------------------------------------------------------------- /Programming Assignment 1 - Air Pollution/specdata/162.csv: -------------------------------------------------------------------------------- 1 | "Date","sulfate","nitrate","ID" 2 | "2010-01-01",NA,NA,162 3 | "2010-01-02",NA,NA,162 4 | "2010-01-03",NA,NA,162 5 | "2010-01-04",NA,NA,162 6 | "2010-01-05",NA,NA,162 7 | "2010-01-06",NA,NA,162 8 | "2010-01-07",NA,NA,162 9 | "2010-01-08",NA,NA,162 10 | "2010-01-09",NA,NA,162 11 | "2010-01-10",NA,NA,162 12 | "2010-01-11",NA,NA,162 13 | "2010-01-12",NA,NA,162 14 | "2010-01-13",NA,NA,162 15 | "2010-01-14",NA,NA,162 16 | "2010-01-15",NA,NA,162 17 | "2010-01-16",NA,NA,162 18 | "2010-01-17",NA,NA,162 19 | "2010-01-18",NA,NA,162 20 | "2010-01-19",NA,NA,162 21 | "2010-01-20",NA,NA,162 22 | "2010-01-21",NA,NA,162 23 | "2010-01-22",NA,NA,162 24 | "2010-01-23",NA,NA,162 25 | "2010-01-24",NA,NA,162 26 | "2010-01-25",NA,NA,162 27 | "2010-01-26",NA,NA,162 28 | "2010-01-27",NA,NA,162 29 | "2010-01-28",NA,NA,162 30 | "2010-01-29",NA,NA,162 31 | "2010-01-30",NA,NA,162 32 | "2010-01-31",NA,NA,162 33 | "2010-02-01",NA,NA,162 34 | "2010-02-02",NA,NA,162 35 | "2010-02-03",NA,NA,162 36 | "2010-02-04",NA,NA,162 37 | "2010-02-05",NA,NA,162 38 | "2010-02-06",NA,NA,162 39 | "2010-02-07",NA,NA,162 40 | "2010-02-08",NA,NA,162 41 | "2010-02-09",NA,NA,162 42 | "2010-02-10",NA,NA,162 43 | "2010-02-11",NA,NA,162 44 | "2010-02-12",NA,NA,162 45 | "2010-02-13",NA,NA,162 46 | "2010-02-14",NA,NA,162 47 | "2010-02-15",NA,NA,162 48 | "2010-02-16",NA,NA,162 49 | "2010-02-17",NA,NA,162 50 | "2010-02-18",NA,NA,162 51 | "2010-02-19",NA,NA,162 52 | "2010-02-20",NA,NA,162 53 | "2010-02-21",NA,NA,162 54 | "2010-02-22",NA,NA,162 55 | "2010-02-23",NA,NA,162 56 | "2010-02-24",NA,NA,162 57 | "2010-02-25",NA,NA,162 58 | "2010-02-26",NA,NA,162 59 | "2010-02-27",NA,NA,162 60 | "2010-02-28",NA,NA,162 61 | "2010-03-01",NA,NA,162 62 | "2010-03-02",NA,NA,162 63 | "2010-03-03",NA,NA,162 64 | "2010-03-04",NA,NA,162 65 | "2010-03-05",NA,NA,162 66 | "2010-03-06",NA,NA,162 67 | "2010-03-07",NA,NA,162 68 | "2010-03-08",NA,NA,162 69 | "2010-03-09",NA,NA,162 70 | "2010-03-10",NA,NA,162 71 | "2010-03-11",NA,NA,162 72 | "2010-03-12",NA,NA,162 73 | "2010-03-13",NA,NA,162 74 | "2010-03-14",NA,NA,162 75 | "2010-03-15",NA,NA,162 76 | "2010-03-16",NA,NA,162 77 | "2010-03-17",NA,NA,162 78 | "2010-03-18",NA,NA,162 79 | "2010-03-19",NA,NA,162 80 | "2010-03-20",NA,NA,162 81 | "2010-03-21",NA,NA,162 82 | "2010-03-22",NA,NA,162 83 | "2010-03-23",NA,NA,162 84 | "2010-03-24",NA,NA,162 85 | "2010-03-25",NA,NA,162 86 | "2010-03-26",NA,NA,162 87 | "2010-03-27",NA,NA,162 88 | "2010-03-28",NA,NA,162 89 | "2010-03-29",NA,NA,162 90 | "2010-03-30",NA,NA,162 91 | "2010-03-31",NA,NA,162 92 | "2010-04-01",NA,NA,162 93 | "2010-04-02",NA,NA,162 94 | "2010-04-03",NA,NA,162 95 | "2010-04-04",NA,NA,162 96 | "2010-04-05",NA,NA,162 97 | "2010-04-06",NA,NA,162 98 | "2010-04-07",NA,NA,162 99 | "2010-04-08",NA,NA,162 100 | "2010-04-09",NA,NA,162 101 | "2010-04-10",NA,NA,162 102 | "2010-04-11",NA,NA,162 103 | "2010-04-12",NA,NA,162 104 | "2010-04-13",NA,NA,162 105 | "2010-04-14",NA,NA,162 106 | "2010-04-15",NA,NA,162 107 | "2010-04-16",NA,NA,162 108 | "2010-04-17",NA,NA,162 109 | "2010-04-18",NA,NA,162 110 | "2010-04-19",NA,NA,162 111 | "2010-04-20",NA,NA,162 112 | "2010-04-21",NA,NA,162 113 | "2010-04-22",NA,NA,162 114 | "2010-04-23",NA,NA,162 115 | "2010-04-24",NA,NA,162 116 | "2010-04-25",NA,NA,162 117 | "2010-04-26",NA,NA,162 118 | "2010-04-27",NA,NA,162 119 | "2010-04-28",NA,NA,162 120 | "2010-04-29",NA,NA,162 121 | "2010-04-30",NA,NA,162 122 | "2010-05-01",NA,NA,162 123 | "2010-05-02",0.599,0.0969,162 124 | "2010-05-03",NA,NA,162 125 | "2010-05-04",NA,NA,162 126 | "2010-05-05",NA,NA,162 127 | "2010-05-06",NA,NA,162 128 | "2010-05-07",NA,NA,162 129 | "2010-05-08",1.26,0.387,162 130 | "2010-05-09",NA,NA,162 131 | "2010-05-10",NA,NA,162 132 | "2010-05-11",NA,NA,162 133 | "2010-05-12",NA,NA,162 134 | "2010-05-13",NA,NA,162 135 | "2010-05-14",NA,NA,162 136 | "2010-05-15",NA,NA,162 137 | "2010-05-16",NA,NA,162 138 | "2010-05-17",NA,NA,162 139 | "2010-05-18",NA,NA,162 140 | "2010-05-19",NA,NA,162 141 | "2010-05-20",NA,NA,162 142 | "2010-05-21",NA,NA,162 143 | "2010-05-22",NA,NA,162 144 | "2010-05-23",NA,NA,162 145 | "2010-05-24",NA,NA,162 146 | "2010-05-25",NA,NA,162 147 | "2010-05-26",NA,NA,162 148 | "2010-05-27",NA,NA,162 149 | "2010-05-28",NA,NA,162 150 | "2010-05-29",NA,NA,162 151 | "2010-05-30",NA,NA,162 152 | "2010-05-31",NA,NA,162 153 | "2010-06-01",NA,NA,162 154 | "2010-06-02",NA,NA,162 155 | "2010-06-03",NA,NA,162 156 | "2010-06-04",NA,NA,162 157 | "2010-06-05",NA,NA,162 158 | "2010-06-06",NA,NA,162 159 | "2010-06-07",NA,NA,162 160 | "2010-06-08",NA,NA,162 161 | "2010-06-09",NA,NA,162 162 | "2010-06-10",NA,NA,162 163 | "2010-06-11",NA,NA,162 164 | "2010-06-12",NA,NA,162 165 | "2010-06-13",NA,NA,162 166 | "2010-06-14",NA,NA,162 167 | "2010-06-15",NA,NA,162 168 | "2010-06-16",NA,NA,162 169 | "2010-06-17",NA,NA,162 170 | "2010-06-18",NA,NA,162 171 | "2010-06-19",NA,NA,162 172 | "2010-06-20",NA,NA,162 173 | "2010-06-21",NA,NA,162 174 | "2010-06-22",NA,NA,162 175 | "2010-06-23",NA,NA,162 176 | "2010-06-24",NA,NA,162 177 | "2010-06-25",NA,NA,162 178 | "2010-06-26",NA,NA,162 179 | "2010-06-27",NA,NA,162 180 | "2010-06-28",NA,NA,162 181 | "2010-06-29",NA,NA,162 182 | "2010-06-30",NA,NA,162 183 | "2010-07-01",NA,NA,162 184 | "2010-07-02",NA,NA,162 185 | "2010-07-03",NA,NA,162 186 | "2010-07-04",NA,NA,162 187 | "2010-07-05",NA,NA,162 188 | "2010-07-06",NA,NA,162 189 | "2010-07-07",NA,NA,162 190 | "2010-07-08",NA,NA,162 191 | "2010-07-09",NA,NA,162 192 | "2010-07-10",NA,NA,162 193 | "2010-07-11",NA,NA,162 194 | "2010-07-12",NA,NA,162 195 | "2010-07-13",NA,NA,162 196 | "2010-07-14",NA,NA,162 197 | "2010-07-15",NA,NA,162 198 | "2010-07-16",NA,NA,162 199 | "2010-07-17",NA,NA,162 200 | "2010-07-18",NA,NA,162 201 | "2010-07-19",NA,NA,162 202 | "2010-07-20",NA,NA,162 203 | "2010-07-21",NA,NA,162 204 | "2010-07-22",NA,NA,162 205 | "2010-07-23",NA,NA,162 206 | "2010-07-24",NA,NA,162 207 | "2010-07-25",NA,NA,162 208 | "2010-07-26",NA,NA,162 209 | "2010-07-27",NA,NA,162 210 | "2010-07-28",NA,NA,162 211 | "2010-07-29",NA,NA,162 212 | "2010-07-30",NA,NA,162 213 | "2010-07-31",NA,NA,162 214 | "2010-08-01",NA,NA,162 215 | "2010-08-02",NA,NA,162 216 | "2010-08-03",NA,NA,162 217 | "2010-08-04",NA,NA,162 218 | "2010-08-05",NA,NA,162 219 | "2010-08-06",NA,NA,162 220 | "2010-08-07",NA,NA,162 221 | "2010-08-08",NA,NA,162 222 | "2010-08-09",NA,NA,162 223 | "2010-08-10",NA,NA,162 224 | "2010-08-11",NA,NA,162 225 | "2010-08-12",NA,NA,162 226 | "2010-08-13",NA,NA,162 227 | "2010-08-14",NA,NA,162 228 | "2010-08-15",NA,NA,162 229 | "2010-08-16",NA,NA,162 230 | "2010-08-17",NA,NA,162 231 | "2010-08-18",NA,NA,162 232 | "2010-08-19",NA,NA,162 233 | "2010-08-20",NA,NA,162 234 | "2010-08-21",NA,NA,162 235 | "2010-08-22",NA,NA,162 236 | "2010-08-23",NA,NA,162 237 | "2010-08-24",NA,NA,162 238 | "2010-08-25",NA,NA,162 239 | "2010-08-26",NA,NA,162 240 | "2010-08-27",NA,NA,162 241 | "2010-08-28",NA,NA,162 242 | "2010-08-29",NA,NA,162 243 | "2010-08-30",NA,NA,162 244 | "2010-08-31",NA,NA,162 245 | "2010-09-01",NA,NA,162 246 | "2010-09-02",NA,NA,162 247 | "2010-09-03",NA,NA,162 248 | "2010-09-04",NA,NA,162 249 | "2010-09-05",NA,NA,162 250 | "2010-09-06",NA,NA,162 251 | "2010-09-07",NA,NA,162 252 | "2010-09-08",NA,NA,162 253 | "2010-09-09",NA,NA,162 254 | "2010-09-10",NA,NA,162 255 | "2010-09-11",NA,NA,162 256 | "2010-09-12",NA,NA,162 257 | "2010-09-13",NA,NA,162 258 | "2010-09-14",NA,NA,162 259 | "2010-09-15",NA,NA,162 260 | "2010-09-16",NA,NA,162 261 | "2010-09-17",NA,NA,162 262 | "2010-09-18",NA,NA,162 263 | "2010-09-19",NA,NA,162 264 | "2010-09-20",NA,NA,162 265 | "2010-09-21",NA,NA,162 266 | "2010-09-22",NA,NA,162 267 | "2010-09-23",NA,NA,162 268 | "2010-09-24",NA,NA,162 269 | "2010-09-25",NA,NA,162 270 | "2010-09-26",NA,NA,162 271 | "2010-09-27",NA,NA,162 272 | "2010-09-28",NA,NA,162 273 | "2010-09-29",NA,NA,162 274 | "2010-09-30",NA,NA,162 275 | "2010-10-01",NA,NA,162 276 | "2010-10-02",NA,NA,162 277 | "2010-10-03",NA,NA,162 278 | "2010-10-04",NA,NA,162 279 | "2010-10-05",NA,NA,162 280 | "2010-10-06",NA,NA,162 281 | "2010-10-07",NA,NA,162 282 | "2010-10-08",NA,NA,162 283 | "2010-10-09",NA,NA,162 284 | "2010-10-10",NA,NA,162 285 | "2010-10-11",NA,NA,162 286 | "2010-10-12",NA,NA,162 287 | "2010-10-13",NA,NA,162 288 | "2010-10-14",NA,NA,162 289 | "2010-10-15",NA,NA,162 290 | "2010-10-16",NA,NA,162 291 | "2010-10-17",NA,NA,162 292 | "2010-10-18",NA,NA,162 293 | "2010-10-19",NA,NA,162 294 | "2010-10-20",NA,NA,162 295 | "2010-10-21",NA,NA,162 296 | "2010-10-22",NA,NA,162 297 | "2010-10-23",NA,NA,162 298 | "2010-10-24",NA,NA,162 299 | "2010-10-25",NA,NA,162 300 | "2010-10-26",NA,NA,162 301 | "2010-10-27",NA,NA,162 302 | "2010-10-28",NA,NA,162 303 | "2010-10-29",NA,NA,162 304 | "2010-10-30",NA,NA,162 305 | "2010-10-31",NA,NA,162 306 | "2010-11-01",NA,NA,162 307 | "2010-11-02",NA,NA,162 308 | "2010-11-03",NA,NA,162 309 | "2010-11-04",NA,NA,162 310 | "2010-11-05",NA,NA,162 311 | "2010-11-06",NA,NA,162 312 | "2010-11-07",NA,NA,162 313 | "2010-11-08",NA,NA,162 314 | "2010-11-09",NA,NA,162 315 | "2010-11-10",NA,NA,162 316 | "2010-11-11",NA,NA,162 317 | "2010-11-12",NA,NA,162 318 | "2010-11-13",NA,NA,162 319 | "2010-11-14",NA,NA,162 320 | "2010-11-15",NA,NA,162 321 | "2010-11-16",NA,NA,162 322 | "2010-11-17",NA,NA,162 323 | "2010-11-18",NA,NA,162 324 | "2010-11-19",NA,NA,162 325 | "2010-11-20",NA,NA,162 326 | "2010-11-21",NA,NA,162 327 | "2010-11-22",NA,NA,162 328 | "2010-11-23",NA,NA,162 329 | "2010-11-24",NA,NA,162 330 | "2010-11-25",NA,NA,162 331 | "2010-11-26",NA,NA,162 332 | "2010-11-27",NA,NA,162 333 | "2010-11-28",NA,NA,162 334 | "2010-11-29",NA,NA,162 335 | "2010-11-30",NA,NA,162 336 | "2010-12-01",NA,NA,162 337 | "2010-12-02",NA,NA,162 338 | "2010-12-03",NA,NA,162 339 | "2010-12-04",NA,NA,162 340 | "2010-12-05",NA,NA,162 341 | "2010-12-06",NA,NA,162 342 | "2010-12-07",NA,NA,162 343 | "2010-12-08",NA,NA,162 344 | "2010-12-09",NA,NA,162 345 | "2010-12-10",NA,NA,162 346 | "2010-12-11",NA,NA,162 347 | "2010-12-12",NA,NA,162 348 | "2010-12-13",NA,NA,162 349 | "2010-12-14",NA,NA,162 350 | "2010-12-15",NA,NA,162 351 | "2010-12-16",NA,NA,162 352 | "2010-12-17",NA,NA,162 353 | "2010-12-18",NA,NA,162 354 | "2010-12-19",NA,NA,162 355 | "2010-12-20",NA,NA,162 356 | "2010-12-21",NA,NA,162 357 | "2010-12-22",NA,NA,162 358 | "2010-12-23",NA,NA,162 359 | "2010-12-24",NA,NA,162 360 | "2010-12-25",NA,NA,162 361 | "2010-12-26",NA,NA,162 362 | "2010-12-27",NA,NA,162 363 | "2010-12-28",NA,NA,162 364 | "2010-12-29",NA,NA,162 365 | "2010-12-30",NA,NA,162 366 | "2010-12-31",NA,NA,162 367 | -------------------------------------------------------------------------------- /Programming Assignment 1 - Air Pollution/specdata/169.csv: -------------------------------------------------------------------------------- 1 | "Date","sulfate","nitrate","ID" 2 | "2010-01-01",NA,NA,169 3 | "2010-01-02",NA,NA,169 4 | "2010-01-03",NA,NA,169 5 | "2010-01-04",NA,NA,169 6 | "2010-01-05",NA,NA,169 7 | "2010-01-06",NA,NA,169 8 | "2010-01-07",NA,NA,169 9 | "2010-01-08",NA,NA,169 10 | "2010-01-09",NA,NA,169 11 | "2010-01-10",NA,NA,169 12 | "2010-01-11",NA,NA,169 13 | "2010-01-12",NA,NA,169 14 | "2010-01-13",NA,NA,169 15 | "2010-01-14",NA,NA,169 16 | "2010-01-15",NA,NA,169 17 | "2010-01-16",NA,NA,169 18 | "2010-01-17",NA,NA,169 19 | "2010-01-18",NA,NA,169 20 | "2010-01-19",NA,NA,169 21 | "2010-01-20",NA,1.43,169 22 | "2010-01-21",NA,NA,169 23 | "2010-01-22",NA,NA,169 24 | "2010-01-23",NA,NA,169 25 | "2010-01-24",NA,NA,169 26 | "2010-01-25",NA,NA,169 27 | "2010-01-26",NA,0.601,169 28 | "2010-01-27",NA,NA,169 29 | "2010-01-28",NA,NA,169 30 | "2010-01-29",NA,NA,169 31 | "2010-01-30",NA,NA,169 32 | "2010-01-31",NA,NA,169 33 | "2010-02-01",NA,NA,169 34 | "2010-02-02",NA,NA,169 35 | "2010-02-03",NA,NA,169 36 | "2010-02-04",NA,0.685,169 37 | "2010-02-05",NA,NA,169 38 | "2010-02-06",NA,NA,169 39 | "2010-02-07",NA,NA,169 40 | "2010-02-08",NA,NA,169 41 | "2010-02-09",NA,NA,169 42 | "2010-02-10",NA,NA,169 43 | "2010-02-11",NA,NA,169 44 | "2010-02-12",NA,NA,169 45 | "2010-02-13",1.21,1.22,169 46 | "2010-02-14",NA,NA,169 47 | "2010-02-15",NA,NA,169 48 | "2010-02-16",NA,NA,169 49 | "2010-02-17",NA,NA,169 50 | "2010-02-18",NA,NA,169 51 | "2010-02-19",1.32,0.269,169 52 | "2010-02-20",NA,NA,169 53 | "2010-02-21",NA,NA,169 54 | "2010-02-22",NA,NA,169 55 | "2010-02-23",NA,NA,169 56 | "2010-02-24",NA,NA,169 57 | "2010-02-25",NA,3.04,169 58 | "2010-02-26",NA,NA,169 59 | "2010-02-27",NA,NA,169 60 | "2010-02-28",3.12,3.64,169 61 | "2010-03-01",NA,NA,169 62 | "2010-03-02",NA,NA,169 63 | "2010-03-03",NA,NA,169 64 | "2010-03-04",NA,NA,169 65 | "2010-03-05",NA,NA,169 66 | "2010-03-06",NA,NA,169 67 | "2010-03-07",NA,NA,169 68 | "2010-03-08",NA,NA,169 69 | "2010-03-09",1.7,1.03,169 70 | "2010-03-10",NA,NA,169 71 | "2010-03-11",NA,NA,169 72 | "2010-03-12",NA,NA,169 73 | "2010-03-13",NA,NA,169 74 | "2010-03-14",NA,NA,169 75 | "2010-03-15",NA,NA,169 76 | "2010-03-16",NA,NA,169 77 | "2010-03-17",NA,NA,169 78 | "2010-03-18",1.06,0.673,169 79 | "2010-03-19",NA,NA,169 80 | "2010-03-20",NA,NA,169 81 | "2010-03-21",4.63,3.81,169 82 | "2010-03-22",NA,NA,169 83 | "2010-03-23",NA,NA,169 84 | "2010-03-24",NA,0.255,169 85 | "2010-03-25",NA,NA,169 86 | "2010-03-26",NA,NA,169 87 | "2010-03-27",1.31,1.38,169 88 | "2010-03-28",NA,NA,169 89 | "2010-03-29",NA,NA,169 90 | "2010-03-30",0.253,0.154,169 91 | "2010-03-31",NA,NA,169 92 | "2010-04-01",NA,NA,169 93 | "2010-04-02",NA,NA,169 94 | "2010-04-03",NA,NA,169 95 | "2010-04-04",NA,NA,169 96 | "2010-04-05",NA,NA,169 97 | "2010-04-06",NA,NA,169 98 | "2010-04-07",NA,NA,169 99 | "2010-04-08",2.53,0.846,169 100 | "2010-04-09",NA,NA,169 101 | "2010-04-10",NA,NA,169 102 | "2010-04-11",2.41,0.643,169 103 | "2010-04-12",NA,NA,169 104 | "2010-04-13",NA,NA,169 105 | "2010-04-14",1.4,2.43,169 106 | "2010-04-15",NA,NA,169 107 | "2010-04-16",NA,NA,169 108 | "2010-04-17",1.22,1.68,169 109 | "2010-04-18",NA,NA,169 110 | "2010-04-19",NA,NA,169 111 | "2010-04-20",0.663,0.242,169 112 | "2010-04-21",NA,NA,169 113 | "2010-04-22",NA,NA,169 114 | "2010-04-23",NA,NA,169 115 | "2010-04-24",NA,NA,169 116 | "2010-04-25",NA,NA,169 117 | "2010-04-26",1.2,1.79,169 118 | "2010-04-27",NA,NA,169 119 | "2010-04-28",NA,NA,169 120 | "2010-04-29",0.792,0.214,169 121 | "2010-04-30",NA,NA,169 122 | "2010-05-01",NA,NA,169 123 | "2010-05-02",NA,NA,169 124 | "2010-05-03",NA,NA,169 125 | "2010-05-04",NA,NA,169 126 | "2010-05-05",2.45,0.359,169 127 | "2010-05-06",NA,NA,169 128 | "2010-05-07",NA,NA,169 129 | "2010-05-08",1.7,0.564,169 130 | "2010-05-09",NA,NA,169 131 | "2010-05-10",NA,NA,169 132 | "2010-05-11",NA,NA,169 133 | "2010-05-12",NA,NA,169 134 | "2010-05-13",NA,NA,169 135 | "2010-05-14",NA,NA,169 136 | "2010-05-15",NA,NA,169 137 | "2010-05-16",NA,NA,169 138 | "2010-05-17",NA,NA,169 139 | "2010-05-18",NA,NA,169 140 | "2010-05-19",NA,NA,169 141 | "2010-05-20",NA,NA,169 142 | "2010-05-21",NA,NA,169 143 | "2010-05-22",NA,NA,169 144 | "2010-05-23",NA,NA,169 145 | "2010-05-24",NA,NA,169 146 | "2010-05-25",NA,NA,169 147 | "2010-05-26",NA,NA,169 148 | "2010-05-27",NA,NA,169 149 | "2010-05-28",NA,NA,169 150 | "2010-05-29",NA,NA,169 151 | "2010-05-30",NA,NA,169 152 | "2010-05-31",NA,NA,169 153 | "2010-06-01",NA,NA,169 154 | "2010-06-02",NA,NA,169 155 | "2010-06-03",NA,NA,169 156 | "2010-06-04",NA,NA,169 157 | "2010-06-05",NA,NA,169 158 | "2010-06-06",NA,NA,169 159 | "2010-06-07",NA,NA,169 160 | "2010-06-08",NA,NA,169 161 | "2010-06-09",NA,NA,169 162 | "2010-06-10",NA,NA,169 163 | "2010-06-11",NA,NA,169 164 | "2010-06-12",NA,NA,169 165 | "2010-06-13",NA,NA,169 166 | "2010-06-14",NA,NA,169 167 | "2010-06-15",NA,NA,169 168 | "2010-06-16",NA,NA,169 169 | "2010-06-17",NA,NA,169 170 | "2010-06-18",NA,NA,169 171 | "2010-06-19",NA,NA,169 172 | "2010-06-20",NA,NA,169 173 | "2010-06-21",NA,NA,169 174 | "2010-06-22",NA,NA,169 175 | "2010-06-23",NA,NA,169 176 | "2010-06-24",NA,NA,169 177 | "2010-06-25",NA,NA,169 178 | "2010-06-26",NA,NA,169 179 | "2010-06-27",NA,NA,169 180 | "2010-06-28",NA,NA,169 181 | "2010-06-29",NA,NA,169 182 | "2010-06-30",NA,NA,169 183 | "2010-07-01",NA,NA,169 184 | "2010-07-02",NA,NA,169 185 | "2010-07-03",NA,NA,169 186 | "2010-07-04",NA,NA,169 187 | "2010-07-05",NA,NA,169 188 | "2010-07-06",NA,NA,169 189 | "2010-07-07",NA,NA,169 190 | "2010-07-08",NA,NA,169 191 | "2010-07-09",NA,NA,169 192 | "2010-07-10",NA,NA,169 193 | "2010-07-11",NA,NA,169 194 | "2010-07-12",NA,NA,169 195 | "2010-07-13",NA,NA,169 196 | "2010-07-14",NA,NA,169 197 | "2010-07-15",NA,NA,169 198 | "2010-07-16",NA,NA,169 199 | "2010-07-17",NA,NA,169 200 | "2010-07-18",NA,NA,169 201 | "2010-07-19",NA,NA,169 202 | "2010-07-20",NA,NA,169 203 | "2010-07-21",NA,NA,169 204 | "2010-07-22",NA,NA,169 205 | "2010-07-23",NA,NA,169 206 | "2010-07-24",NA,NA,169 207 | "2010-07-25",NA,NA,169 208 | "2010-07-26",NA,NA,169 209 | "2010-07-27",NA,NA,169 210 | "2010-07-28",NA,NA,169 211 | "2010-07-29",NA,NA,169 212 | "2010-07-30",NA,NA,169 213 | "2010-07-31",NA,NA,169 214 | "2010-08-01",NA,NA,169 215 | "2010-08-02",NA,NA,169 216 | "2010-08-03",NA,NA,169 217 | "2010-08-04",NA,NA,169 218 | "2010-08-05",NA,NA,169 219 | "2010-08-06",NA,NA,169 220 | "2010-08-07",NA,NA,169 221 | "2010-08-08",NA,NA,169 222 | "2010-08-09",NA,NA,169 223 | "2010-08-10",NA,NA,169 224 | "2010-08-11",NA,NA,169 225 | "2010-08-12",NA,NA,169 226 | "2010-08-13",NA,NA,169 227 | "2010-08-14",NA,NA,169 228 | "2010-08-15",NA,NA,169 229 | "2010-08-16",NA,NA,169 230 | "2010-08-17",NA,NA,169 231 | "2010-08-18",NA,NA,169 232 | "2010-08-19",NA,NA,169 233 | "2010-08-20",NA,NA,169 234 | "2010-08-21",NA,NA,169 235 | "2010-08-22",NA,NA,169 236 | "2010-08-23",NA,NA,169 237 | "2010-08-24",NA,NA,169 238 | "2010-08-25",NA,NA,169 239 | "2010-08-26",NA,NA,169 240 | "2010-08-27",NA,NA,169 241 | "2010-08-28",NA,NA,169 242 | "2010-08-29",NA,NA,169 243 | "2010-08-30",NA,NA,169 244 | "2010-08-31",NA,NA,169 245 | "2010-09-01",NA,NA,169 246 | "2010-09-02",NA,NA,169 247 | "2010-09-03",NA,NA,169 248 | "2010-09-04",NA,NA,169 249 | "2010-09-05",NA,NA,169 250 | "2010-09-06",NA,NA,169 251 | "2010-09-07",NA,NA,169 252 | "2010-09-08",NA,NA,169 253 | "2010-09-09",NA,NA,169 254 | "2010-09-10",NA,NA,169 255 | "2010-09-11",NA,NA,169 256 | "2010-09-12",NA,NA,169 257 | "2010-09-13",NA,NA,169 258 | "2010-09-14",NA,NA,169 259 | "2010-09-15",NA,NA,169 260 | "2010-09-16",NA,NA,169 261 | "2010-09-17",NA,NA,169 262 | "2010-09-18",NA,NA,169 263 | "2010-09-19",NA,NA,169 264 | "2010-09-20",NA,NA,169 265 | "2010-09-21",NA,NA,169 266 | "2010-09-22",NA,NA,169 267 | "2010-09-23",NA,NA,169 268 | "2010-09-24",NA,NA,169 269 | "2010-09-25",NA,NA,169 270 | "2010-09-26",NA,NA,169 271 | "2010-09-27",NA,NA,169 272 | "2010-09-28",NA,NA,169 273 | "2010-09-29",NA,NA,169 274 | "2010-09-30",NA,NA,169 275 | "2010-10-01",NA,NA,169 276 | "2010-10-02",NA,NA,169 277 | "2010-10-03",NA,NA,169 278 | "2010-10-04",NA,NA,169 279 | "2010-10-05",NA,NA,169 280 | "2010-10-06",NA,NA,169 281 | "2010-10-07",NA,NA,169 282 | "2010-10-08",NA,NA,169 283 | "2010-10-09",NA,NA,169 284 | "2010-10-10",NA,NA,169 285 | "2010-10-11",NA,NA,169 286 | "2010-10-12",NA,NA,169 287 | "2010-10-13",NA,NA,169 288 | "2010-10-14",NA,NA,169 289 | "2010-10-15",NA,NA,169 290 | "2010-10-16",NA,NA,169 291 | "2010-10-17",NA,NA,169 292 | "2010-10-18",NA,NA,169 293 | "2010-10-19",NA,NA,169 294 | "2010-10-20",NA,NA,169 295 | "2010-10-21",NA,NA,169 296 | "2010-10-22",NA,NA,169 297 | "2010-10-23",NA,NA,169 298 | "2010-10-24",NA,NA,169 299 | "2010-10-25",NA,NA,169 300 | "2010-10-26",NA,NA,169 301 | "2010-10-27",NA,NA,169 302 | "2010-10-28",NA,NA,169 303 | "2010-10-29",NA,NA,169 304 | "2010-10-30",NA,NA,169 305 | "2010-10-31",NA,NA,169 306 | "2010-11-01",NA,NA,169 307 | "2010-11-02",NA,NA,169 308 | "2010-11-03",NA,NA,169 309 | "2010-11-04",NA,NA,169 310 | "2010-11-05",NA,NA,169 311 | "2010-11-06",NA,NA,169 312 | "2010-11-07",NA,NA,169 313 | "2010-11-08",NA,NA,169 314 | "2010-11-09",NA,NA,169 315 | "2010-11-10",NA,NA,169 316 | "2010-11-11",NA,NA,169 317 | "2010-11-12",NA,NA,169 318 | "2010-11-13",NA,NA,169 319 | "2010-11-14",NA,NA,169 320 | "2010-11-15",NA,NA,169 321 | "2010-11-16",NA,NA,169 322 | "2010-11-17",NA,NA,169 323 | "2010-11-18",NA,NA,169 324 | "2010-11-19",NA,NA,169 325 | "2010-11-20",NA,NA,169 326 | "2010-11-21",NA,NA,169 327 | "2010-11-22",NA,NA,169 328 | "2010-11-23",NA,NA,169 329 | "2010-11-24",NA,NA,169 330 | "2010-11-25",NA,NA,169 331 | "2010-11-26",NA,NA,169 332 | "2010-11-27",NA,NA,169 333 | "2010-11-28",NA,NA,169 334 | "2010-11-29",NA,NA,169 335 | "2010-11-30",NA,NA,169 336 | "2010-12-01",NA,NA,169 337 | "2010-12-02",NA,NA,169 338 | "2010-12-03",NA,NA,169 339 | "2010-12-04",NA,NA,169 340 | "2010-12-05",NA,NA,169 341 | "2010-12-06",NA,NA,169 342 | "2010-12-07",NA,NA,169 343 | "2010-12-08",NA,NA,169 344 | "2010-12-09",NA,NA,169 345 | "2010-12-10",NA,NA,169 346 | "2010-12-11",NA,NA,169 347 | "2010-12-12",NA,NA,169 348 | "2010-12-13",NA,NA,169 349 | "2010-12-14",NA,NA,169 350 | "2010-12-15",NA,NA,169 351 | "2010-12-16",NA,NA,169 352 | "2010-12-17",NA,NA,169 353 | "2010-12-18",NA,NA,169 354 | "2010-12-19",NA,NA,169 355 | "2010-12-20",NA,NA,169 356 | "2010-12-21",NA,NA,169 357 | "2010-12-22",NA,NA,169 358 | "2010-12-23",NA,NA,169 359 | "2010-12-24",NA,NA,169 360 | "2010-12-25",NA,NA,169 361 | "2010-12-26",NA,NA,169 362 | "2010-12-27",NA,NA,169 363 | "2010-12-28",NA,NA,169 364 | "2010-12-29",NA,NA,169 365 | "2010-12-30",NA,NA,169 366 | "2010-12-31",NA,NA,169 367 | -------------------------------------------------------------------------------- /Programming Assignment 1 - Air Pollution/specdata/175.csv: -------------------------------------------------------------------------------- 1 | "Date","sulfate","nitrate","ID" 2 | "2001-01-01",NA,NA,175 3 | "2001-01-02",NA,NA,175 4 | "2001-01-03",NA,NA,175 5 | "2001-01-04",NA,NA,175 6 | "2001-01-05",NA,NA,175 7 | "2001-01-06",NA,NA,175 8 | "2001-01-07",6.09,6.54,175 9 | "2001-01-08",NA,NA,175 10 | "2001-01-09",NA,NA,175 11 | "2001-01-10",0.321,0.278,175 12 | "2001-01-11",NA,NA,175 13 | "2001-01-12",NA,NA,175 14 | "2001-01-13",NA,NA,175 15 | "2001-01-14",NA,NA,175 16 | "2001-01-15",NA,NA,175 17 | "2001-01-16",5.67,3.6,175 18 | "2001-01-17",NA,NA,175 19 | "2001-01-18",NA,NA,175 20 | "2001-01-19",NA,NA,175 21 | "2001-01-20",NA,NA,175 22 | "2001-01-21",NA,NA,175 23 | "2001-01-22",NA,NA,175 24 | "2001-01-23",NA,NA,175 25 | "2001-01-24",NA,NA,175 26 | "2001-01-25",NA,NA,175 27 | "2001-01-26",NA,NA,175 28 | "2001-01-27",NA,NA,175 29 | "2001-01-28",NA,NA,175 30 | "2001-01-29",NA,NA,175 31 | "2001-01-30",NA,NA,175 32 | "2001-01-31",NA,NA,175 33 | "2001-02-01",NA,NA,175 34 | "2001-02-02",NA,NA,175 35 | "2001-02-03",NA,NA,175 36 | "2001-02-04",NA,NA,175 37 | "2001-02-05",NA,NA,175 38 | "2001-02-06",NA,NA,175 39 | "2001-02-07",NA,NA,175 40 | "2001-02-08",NA,NA,175 41 | "2001-02-09",NA,NA,175 42 | "2001-02-10",NA,NA,175 43 | "2001-02-11",NA,NA,175 44 | "2001-02-12",NA,NA,175 45 | "2001-02-13",NA,NA,175 46 | "2001-02-14",NA,NA,175 47 | "2001-02-15",NA,NA,175 48 | "2001-02-16",NA,NA,175 49 | "2001-02-17",NA,NA,175 50 | "2001-02-18",NA,NA,175 51 | "2001-02-19",NA,NA,175 52 | "2001-02-20",NA,NA,175 53 | "2001-02-21",NA,NA,175 54 | "2001-02-22",NA,NA,175 55 | "2001-02-23",NA,NA,175 56 | "2001-02-24",NA,NA,175 57 | "2001-02-25",NA,NA,175 58 | "2001-02-26",NA,NA,175 59 | "2001-02-27",NA,NA,175 60 | "2001-02-28",NA,NA,175 61 | "2001-03-01",NA,NA,175 62 | "2001-03-02",NA,NA,175 63 | "2001-03-03",NA,NA,175 64 | "2001-03-04",NA,NA,175 65 | "2001-03-05",NA,NA,175 66 | "2001-03-06",NA,NA,175 67 | "2001-03-07",NA,NA,175 68 | "2001-03-08",NA,NA,175 69 | "2001-03-09",NA,NA,175 70 | "2001-03-10",NA,NA,175 71 | "2001-03-11",NA,NA,175 72 | "2001-03-12",NA,NA,175 73 | "2001-03-13",NA,NA,175 74 | "2001-03-14",NA,NA,175 75 | "2001-03-15",NA,NA,175 76 | "2001-03-16",NA,NA,175 77 | "2001-03-17",NA,NA,175 78 | "2001-03-18",NA,NA,175 79 | "2001-03-19",NA,NA,175 80 | "2001-03-20",NA,NA,175 81 | "2001-03-21",NA,NA,175 82 | "2001-03-22",NA,NA,175 83 | "2001-03-23",NA,NA,175 84 | "2001-03-24",NA,NA,175 85 | "2001-03-25",NA,NA,175 86 | "2001-03-26",NA,NA,175 87 | "2001-03-27",NA,NA,175 88 | "2001-03-28",NA,NA,175 89 | "2001-03-29",NA,NA,175 90 | "2001-03-30",NA,NA,175 91 | "2001-03-31",NA,NA,175 92 | "2001-04-01",NA,NA,175 93 | "2001-04-02",NA,NA,175 94 | "2001-04-03",NA,NA,175 95 | "2001-04-04",NA,NA,175 96 | "2001-04-05",NA,NA,175 97 | "2001-04-06",NA,NA,175 98 | "2001-04-07",NA,NA,175 99 | "2001-04-08",NA,NA,175 100 | "2001-04-09",NA,NA,175 101 | "2001-04-10",NA,NA,175 102 | "2001-04-11",NA,NA,175 103 | "2001-04-12",NA,NA,175 104 | "2001-04-13",NA,NA,175 105 | "2001-04-14",NA,NA,175 106 | "2001-04-15",NA,NA,175 107 | "2001-04-16",NA,NA,175 108 | "2001-04-17",NA,NA,175 109 | "2001-04-18",NA,NA,175 110 | "2001-04-19",NA,NA,175 111 | "2001-04-20",NA,NA,175 112 | "2001-04-21",NA,NA,175 113 | "2001-04-22",NA,NA,175 114 | "2001-04-23",NA,NA,175 115 | "2001-04-24",NA,NA,175 116 | "2001-04-25",NA,NA,175 117 | "2001-04-26",NA,NA,175 118 | "2001-04-27",NA,NA,175 119 | "2001-04-28",NA,NA,175 120 | "2001-04-29",NA,NA,175 121 | "2001-04-30",NA,NA,175 122 | "2001-05-01",NA,NA,175 123 | "2001-05-02",NA,NA,175 124 | "2001-05-03",NA,NA,175 125 | "2001-05-04",NA,NA,175 126 | "2001-05-05",NA,NA,175 127 | "2001-05-06",NA,NA,175 128 | "2001-05-07",NA,NA,175 129 | "2001-05-08",NA,NA,175 130 | "2001-05-09",NA,NA,175 131 | "2001-05-10",NA,NA,175 132 | "2001-05-11",NA,NA,175 133 | "2001-05-12",NA,NA,175 134 | "2001-05-13",NA,NA,175 135 | "2001-05-14",NA,NA,175 136 | "2001-05-15",NA,NA,175 137 | "2001-05-16",NA,NA,175 138 | "2001-05-17",NA,NA,175 139 | "2001-05-18",NA,NA,175 140 | "2001-05-19",NA,NA,175 141 | "2001-05-20",NA,NA,175 142 | "2001-05-21",NA,NA,175 143 | "2001-05-22",NA,NA,175 144 | "2001-05-23",NA,NA,175 145 | "2001-05-24",NA,NA,175 146 | "2001-05-25",NA,NA,175 147 | "2001-05-26",NA,NA,175 148 | "2001-05-27",NA,NA,175 149 | "2001-05-28",NA,NA,175 150 | "2001-05-29",NA,NA,175 151 | "2001-05-30",NA,NA,175 152 | "2001-05-31",NA,NA,175 153 | "2001-06-01",NA,NA,175 154 | "2001-06-02",NA,NA,175 155 | "2001-06-03",NA,NA,175 156 | "2001-06-04",NA,NA,175 157 | "2001-06-05",NA,NA,175 158 | "2001-06-06",NA,NA,175 159 | "2001-06-07",NA,NA,175 160 | "2001-06-08",NA,NA,175 161 | "2001-06-09",NA,NA,175 162 | "2001-06-10",NA,NA,175 163 | "2001-06-11",NA,NA,175 164 | "2001-06-12",NA,NA,175 165 | "2001-06-13",NA,NA,175 166 | "2001-06-14",NA,NA,175 167 | "2001-06-15",NA,NA,175 168 | "2001-06-16",NA,NA,175 169 | "2001-06-17",NA,NA,175 170 | "2001-06-18",NA,NA,175 171 | "2001-06-19",NA,NA,175 172 | "2001-06-20",NA,NA,175 173 | "2001-06-21",NA,NA,175 174 | "2001-06-22",NA,NA,175 175 | "2001-06-23",NA,NA,175 176 | "2001-06-24",NA,NA,175 177 | "2001-06-25",NA,NA,175 178 | "2001-06-26",NA,NA,175 179 | "2001-06-27",NA,NA,175 180 | "2001-06-28",NA,NA,175 181 | "2001-06-29",NA,NA,175 182 | "2001-06-30",NA,NA,175 183 | "2001-07-01",NA,NA,175 184 | "2001-07-02",NA,NA,175 185 | "2001-07-03",NA,NA,175 186 | "2001-07-04",NA,NA,175 187 | "2001-07-05",NA,NA,175 188 | "2001-07-06",NA,NA,175 189 | "2001-07-07",NA,NA,175 190 | "2001-07-08",NA,NA,175 191 | "2001-07-09",NA,NA,175 192 | "2001-07-10",NA,NA,175 193 | "2001-07-11",NA,NA,175 194 | "2001-07-12",NA,NA,175 195 | "2001-07-13",NA,NA,175 196 | "2001-07-14",NA,NA,175 197 | "2001-07-15",NA,NA,175 198 | "2001-07-16",NA,NA,175 199 | "2001-07-17",NA,NA,175 200 | "2001-07-18",NA,NA,175 201 | "2001-07-19",NA,NA,175 202 | "2001-07-20",NA,NA,175 203 | "2001-07-21",NA,NA,175 204 | "2001-07-22",NA,NA,175 205 | "2001-07-23",NA,NA,175 206 | "2001-07-24",NA,NA,175 207 | "2001-07-25",NA,NA,175 208 | "2001-07-26",NA,NA,175 209 | "2001-07-27",NA,NA,175 210 | "2001-07-28",NA,NA,175 211 | "2001-07-29",NA,NA,175 212 | "2001-07-30",NA,NA,175 213 | "2001-07-31",NA,NA,175 214 | "2001-08-01",NA,NA,175 215 | "2001-08-02",NA,NA,175 216 | "2001-08-03",NA,NA,175 217 | "2001-08-04",NA,NA,175 218 | "2001-08-05",NA,NA,175 219 | "2001-08-06",NA,NA,175 220 | "2001-08-07",NA,NA,175 221 | "2001-08-08",NA,NA,175 222 | "2001-08-09",NA,NA,175 223 | "2001-08-10",NA,NA,175 224 | "2001-08-11",NA,NA,175 225 | "2001-08-12",NA,NA,175 226 | "2001-08-13",NA,NA,175 227 | "2001-08-14",NA,NA,175 228 | "2001-08-15",NA,NA,175 229 | "2001-08-16",NA,NA,175 230 | "2001-08-17",NA,NA,175 231 | "2001-08-18",NA,NA,175 232 | "2001-08-19",NA,NA,175 233 | "2001-08-20",NA,NA,175 234 | "2001-08-21",NA,NA,175 235 | "2001-08-22",NA,NA,175 236 | "2001-08-23",NA,NA,175 237 | "2001-08-24",NA,NA,175 238 | "2001-08-25",NA,NA,175 239 | "2001-08-26",NA,NA,175 240 | "2001-08-27",NA,NA,175 241 | "2001-08-28",NA,NA,175 242 | "2001-08-29",NA,NA,175 243 | "2001-08-30",NA,NA,175 244 | "2001-08-31",NA,NA,175 245 | "2001-09-01",NA,NA,175 246 | "2001-09-02",NA,NA,175 247 | "2001-09-03",NA,NA,175 248 | "2001-09-04",NA,NA,175 249 | "2001-09-05",NA,NA,175 250 | "2001-09-06",NA,NA,175 251 | "2001-09-07",NA,NA,175 252 | "2001-09-08",NA,NA,175 253 | "2001-09-09",NA,NA,175 254 | "2001-09-10",NA,NA,175 255 | "2001-09-11",NA,NA,175 256 | "2001-09-12",NA,NA,175 257 | "2001-09-13",NA,NA,175 258 | "2001-09-14",NA,NA,175 259 | "2001-09-15",NA,NA,175 260 | "2001-09-16",NA,NA,175 261 | "2001-09-17",NA,NA,175 262 | "2001-09-18",NA,NA,175 263 | "2001-09-19",NA,NA,175 264 | "2001-09-20",NA,NA,175 265 | "2001-09-21",NA,NA,175 266 | "2001-09-22",NA,NA,175 267 | "2001-09-23",NA,NA,175 268 | "2001-09-24",NA,NA,175 269 | "2001-09-25",NA,NA,175 270 | "2001-09-26",NA,NA,175 271 | "2001-09-27",NA,NA,175 272 | "2001-09-28",NA,NA,175 273 | "2001-09-29",NA,NA,175 274 | "2001-09-30",NA,NA,175 275 | "2001-10-01",NA,NA,175 276 | "2001-10-02",NA,NA,175 277 | "2001-10-03",NA,NA,175 278 | "2001-10-04",NA,NA,175 279 | "2001-10-05",NA,NA,175 280 | "2001-10-06",NA,NA,175 281 | "2001-10-07",NA,NA,175 282 | "2001-10-08",NA,NA,175 283 | "2001-10-09",NA,NA,175 284 | "2001-10-10",NA,NA,175 285 | "2001-10-11",NA,NA,175 286 | "2001-10-12",NA,NA,175 287 | "2001-10-13",NA,NA,175 288 | "2001-10-14",NA,NA,175 289 | "2001-10-15",NA,NA,175 290 | "2001-10-16",NA,NA,175 291 | "2001-10-17",NA,NA,175 292 | "2001-10-18",NA,NA,175 293 | "2001-10-19",NA,NA,175 294 | "2001-10-20",NA,NA,175 295 | "2001-10-21",NA,NA,175 296 | "2001-10-22",NA,NA,175 297 | "2001-10-23",NA,NA,175 298 | "2001-10-24",NA,NA,175 299 | "2001-10-25",NA,NA,175 300 | "2001-10-26",NA,NA,175 301 | "2001-10-27",NA,NA,175 302 | "2001-10-28",NA,NA,175 303 | "2001-10-29",NA,NA,175 304 | "2001-10-30",NA,NA,175 305 | "2001-10-31",NA,NA,175 306 | "2001-11-01",NA,NA,175 307 | "2001-11-02",NA,NA,175 308 | "2001-11-03",NA,NA,175 309 | "2001-11-04",NA,NA,175 310 | "2001-11-05",NA,NA,175 311 | "2001-11-06",NA,NA,175 312 | "2001-11-07",NA,NA,175 313 | "2001-11-08",NA,NA,175 314 | "2001-11-09",NA,NA,175 315 | "2001-11-10",NA,NA,175 316 | "2001-11-11",NA,NA,175 317 | "2001-11-12",NA,NA,175 318 | "2001-11-13",NA,NA,175 319 | "2001-11-14",NA,NA,175 320 | "2001-11-15",NA,NA,175 321 | "2001-11-16",NA,NA,175 322 | "2001-11-17",NA,NA,175 323 | "2001-11-18",NA,NA,175 324 | "2001-11-19",NA,NA,175 325 | "2001-11-20",NA,NA,175 326 | "2001-11-21",NA,NA,175 327 | "2001-11-22",NA,NA,175 328 | "2001-11-23",NA,NA,175 329 | "2001-11-24",NA,NA,175 330 | "2001-11-25",NA,NA,175 331 | "2001-11-26",NA,NA,175 332 | "2001-11-27",NA,NA,175 333 | "2001-11-28",NA,NA,175 334 | "2001-11-29",NA,NA,175 335 | "2001-11-30",NA,NA,175 336 | "2001-12-01",NA,NA,175 337 | "2001-12-02",NA,NA,175 338 | "2001-12-03",NA,NA,175 339 | "2001-12-04",NA,NA,175 340 | "2001-12-05",NA,NA,175 341 | "2001-12-06",NA,NA,175 342 | "2001-12-07",NA,NA,175 343 | "2001-12-08",NA,NA,175 344 | "2001-12-09",NA,NA,175 345 | "2001-12-10",NA,NA,175 346 | "2001-12-11",NA,NA,175 347 | "2001-12-12",NA,NA,175 348 | "2001-12-13",NA,NA,175 349 | "2001-12-14",NA,NA,175 350 | "2001-12-15",NA,NA,175 351 | "2001-12-16",NA,NA,175 352 | "2001-12-17",NA,NA,175 353 | "2001-12-18",NA,NA,175 354 | "2001-12-19",NA,NA,175 355 | "2001-12-20",NA,NA,175 356 | "2001-12-21",NA,NA,175 357 | "2001-12-22",NA,NA,175 358 | "2001-12-23",NA,NA,175 359 | "2001-12-24",NA,NA,175 360 | "2001-12-25",NA,NA,175 361 | "2001-12-26",NA,NA,175 362 | "2001-12-27",NA,NA,175 363 | "2001-12-28",NA,NA,175 364 | "2001-12-29",NA,NA,175 365 | "2001-12-30",NA,NA,175 366 | "2001-12-31",NA,NA,175 367 | -------------------------------------------------------------------------------- /Programming Assignment 1 - Air Pollution/specdata/235.csv: -------------------------------------------------------------------------------- 1 | "Date","sulfate","nitrate","ID" 2 | "2006-01-01",NA,NA,235 3 | "2006-01-02",NA,NA,235 4 | "2006-01-03",NA,NA,235 5 | "2006-01-04",NA,NA,235 6 | "2006-01-05",NA,NA,235 7 | "2006-01-06",NA,NA,235 8 | "2006-01-07",NA,NA,235 9 | "2006-01-08",NA,NA,235 10 | "2006-01-09",NA,NA,235 11 | "2006-01-10",NA,NA,235 12 | "2006-01-11",NA,NA,235 13 | "2006-01-12",NA,NA,235 14 | "2006-01-13",NA,NA,235 15 | "2006-01-14",NA,NA,235 16 | "2006-01-15",NA,NA,235 17 | "2006-01-16",NA,NA,235 18 | "2006-01-17",NA,NA,235 19 | "2006-01-18",NA,NA,235 20 | "2006-01-19",NA,NA,235 21 | "2006-01-20",NA,NA,235 22 | "2006-01-21",NA,NA,235 23 | "2006-01-22",NA,NA,235 24 | "2006-01-23",NA,NA,235 25 | "2006-01-24",NA,NA,235 26 | "2006-01-25",NA,NA,235 27 | "2006-01-26",NA,NA,235 28 | "2006-01-27",NA,NA,235 29 | "2006-01-28",NA,NA,235 30 | "2006-01-29",NA,NA,235 31 | "2006-01-30",NA,NA,235 32 | "2006-01-31",NA,NA,235 33 | "2006-02-01",NA,NA,235 34 | "2006-02-02",NA,NA,235 35 | "2006-02-03",NA,NA,235 36 | "2006-02-04",NA,NA,235 37 | "2006-02-05",NA,NA,235 38 | "2006-02-06",NA,NA,235 39 | "2006-02-07",NA,NA,235 40 | "2006-02-08",NA,NA,235 41 | "2006-02-09",NA,NA,235 42 | "2006-02-10",2.52,6.56,235 43 | "2006-02-11",NA,NA,235 44 | "2006-02-12",NA,NA,235 45 | "2006-02-13",NA,NA,235 46 | "2006-02-14",NA,NA,235 47 | "2006-02-15",NA,NA,235 48 | "2006-02-16",4.79,6.4,235 49 | "2006-02-17",NA,NA,235 50 | "2006-02-18",NA,NA,235 51 | "2006-02-19",NA,NA,235 52 | "2006-02-20",NA,NA,235 53 | "2006-02-21",NA,NA,235 54 | "2006-02-22",7.1,8.83,235 55 | "2006-02-23",NA,NA,235 56 | "2006-02-24",NA,NA,235 57 | "2006-02-25",NA,NA,235 58 | "2006-02-26",NA,NA,235 59 | "2006-02-27",NA,NA,235 60 | "2006-02-28",2.1,3.56,235 61 | "2006-03-01",NA,NA,235 62 | "2006-03-02",NA,NA,235 63 | "2006-03-03",NA,NA,235 64 | "2006-03-04",NA,NA,235 65 | "2006-03-05",NA,NA,235 66 | "2006-03-06",1.14,1.22,235 67 | "2006-03-07",NA,NA,235 68 | "2006-03-08",NA,NA,235 69 | "2006-03-09",NA,NA,235 70 | "2006-03-10",NA,NA,235 71 | "2006-03-11",NA,NA,235 72 | "2006-03-12",9.43,7.99,235 73 | "2006-03-13",NA,NA,235 74 | "2006-03-14",NA,NA,235 75 | "2006-03-15",NA,NA,235 76 | "2006-03-16",NA,NA,235 77 | "2006-03-17",NA,NA,235 78 | "2006-03-18",NA,NA,235 79 | "2006-03-19",NA,NA,235 80 | "2006-03-20",NA,NA,235 81 | "2006-03-21",NA,NA,235 82 | "2006-03-22",NA,NA,235 83 | "2006-03-23",NA,NA,235 84 | "2006-03-24",NA,NA,235 85 | "2006-03-25",NA,NA,235 86 | "2006-03-26",NA,NA,235 87 | "2006-03-27",NA,NA,235 88 | "2006-03-28",NA,NA,235 89 | "2006-03-29",NA,NA,235 90 | "2006-03-30",10.5,12.1,235 91 | "2006-03-31",NA,NA,235 92 | "2006-04-01",NA,NA,235 93 | "2006-04-02",NA,NA,235 94 | "2006-04-03",NA,NA,235 95 | "2006-04-04",NA,NA,235 96 | "2006-04-05",1.67,0.955,235 97 | "2006-04-06",NA,NA,235 98 | "2006-04-07",NA,NA,235 99 | "2006-04-08",NA,NA,235 100 | "2006-04-09",NA,NA,235 101 | "2006-04-10",NA,NA,235 102 | "2006-04-11",4.58,3.37,235 103 | "2006-04-12",NA,NA,235 104 | "2006-04-13",NA,NA,235 105 | "2006-04-14",NA,NA,235 106 | "2006-04-15",NA,NA,235 107 | "2006-04-16",NA,NA,235 108 | "2006-04-17",1.23,0.352,235 109 | "2006-04-18",NA,NA,235 110 | "2006-04-19",NA,NA,235 111 | "2006-04-20",NA,NA,235 112 | "2006-04-21",NA,NA,235 113 | "2006-04-22",NA,NA,235 114 | "2006-04-23",3.25,1.39,235 115 | "2006-04-24",NA,NA,235 116 | "2006-04-25",NA,NA,235 117 | "2006-04-26",NA,NA,235 118 | "2006-04-27",NA,NA,235 119 | "2006-04-28",NA,NA,235 120 | "2006-04-29",1.03,0.618,235 121 | "2006-04-30",NA,NA,235 122 | "2006-05-01",NA,NA,235 123 | "2006-05-02",NA,NA,235 124 | "2006-05-03",NA,NA,235 125 | "2006-05-04",NA,NA,235 126 | "2006-05-05",NA,NA,235 127 | "2006-05-06",NA,NA,235 128 | "2006-05-07",NA,NA,235 129 | "2006-05-08",NA,NA,235 130 | "2006-05-09",NA,NA,235 131 | "2006-05-10",NA,NA,235 132 | "2006-05-11",NA,NA,235 133 | "2006-05-12",NA,NA,235 134 | "2006-05-13",NA,NA,235 135 | "2006-05-14",NA,NA,235 136 | "2006-05-15",NA,NA,235 137 | "2006-05-16",NA,NA,235 138 | "2006-05-17",NA,NA,235 139 | "2006-05-18",NA,NA,235 140 | "2006-05-19",NA,NA,235 141 | "2006-05-20",NA,NA,235 142 | "2006-05-21",NA,NA,235 143 | "2006-05-22",NA,NA,235 144 | "2006-05-23",NA,NA,235 145 | "2006-05-24",NA,NA,235 146 | "2006-05-25",NA,NA,235 147 | "2006-05-26",NA,NA,235 148 | "2006-05-27",NA,NA,235 149 | "2006-05-28",NA,NA,235 150 | "2006-05-29",NA,NA,235 151 | "2006-05-30",NA,NA,235 152 | "2006-05-31",NA,NA,235 153 | "2006-06-01",NA,NA,235 154 | "2006-06-02",NA,NA,235 155 | "2006-06-03",NA,NA,235 156 | "2006-06-04",NA,NA,235 157 | "2006-06-05",NA,NA,235 158 | "2006-06-06",NA,NA,235 159 | "2006-06-07",NA,NA,235 160 | "2006-06-08",NA,NA,235 161 | "2006-06-09",NA,NA,235 162 | "2006-06-10",NA,NA,235 163 | "2006-06-11",NA,NA,235 164 | "2006-06-12",NA,NA,235 165 | "2006-06-13",NA,NA,235 166 | "2006-06-14",NA,NA,235 167 | "2006-06-15",NA,NA,235 168 | "2006-06-16",NA,NA,235 169 | "2006-06-17",NA,NA,235 170 | "2006-06-18",NA,NA,235 171 | "2006-06-19",NA,NA,235 172 | "2006-06-20",NA,NA,235 173 | "2006-06-21",NA,NA,235 174 | "2006-06-22",NA,NA,235 175 | "2006-06-23",NA,NA,235 176 | "2006-06-24",NA,NA,235 177 | "2006-06-25",NA,NA,235 178 | "2006-06-26",NA,NA,235 179 | "2006-06-27",NA,NA,235 180 | "2006-06-28",NA,NA,235 181 | "2006-06-29",NA,NA,235 182 | "2006-06-30",NA,NA,235 183 | "2006-07-01",NA,NA,235 184 | "2006-07-02",NA,NA,235 185 | "2006-07-03",NA,NA,235 186 | "2006-07-04",NA,NA,235 187 | "2006-07-05",NA,NA,235 188 | "2006-07-06",NA,NA,235 189 | "2006-07-07",NA,NA,235 190 | "2006-07-08",NA,NA,235 191 | "2006-07-09",NA,NA,235 192 | "2006-07-10",NA,NA,235 193 | "2006-07-11",NA,NA,235 194 | "2006-07-12",NA,NA,235 195 | "2006-07-13",NA,NA,235 196 | "2006-07-14",NA,NA,235 197 | "2006-07-15",NA,NA,235 198 | "2006-07-16",NA,NA,235 199 | "2006-07-17",NA,NA,235 200 | "2006-07-18",NA,NA,235 201 | "2006-07-19",NA,NA,235 202 | "2006-07-20",NA,NA,235 203 | "2006-07-21",NA,NA,235 204 | "2006-07-22",NA,NA,235 205 | "2006-07-23",NA,NA,235 206 | "2006-07-24",NA,NA,235 207 | "2006-07-25",NA,NA,235 208 | "2006-07-26",NA,NA,235 209 | "2006-07-27",NA,NA,235 210 | "2006-07-28",NA,NA,235 211 | "2006-07-29",NA,NA,235 212 | "2006-07-30",NA,NA,235 213 | "2006-07-31",NA,NA,235 214 | "2006-08-01",NA,NA,235 215 | "2006-08-02",NA,NA,235 216 | "2006-08-03",NA,NA,235 217 | "2006-08-04",NA,NA,235 218 | "2006-08-05",NA,NA,235 219 | "2006-08-06",NA,NA,235 220 | "2006-08-07",NA,NA,235 221 | "2006-08-08",NA,NA,235 222 | "2006-08-09",NA,NA,235 223 | "2006-08-10",NA,NA,235 224 | "2006-08-11",NA,NA,235 225 | "2006-08-12",NA,NA,235 226 | "2006-08-13",NA,NA,235 227 | "2006-08-14",NA,NA,235 228 | "2006-08-15",NA,NA,235 229 | "2006-08-16",NA,NA,235 230 | "2006-08-17",NA,NA,235 231 | "2006-08-18",NA,NA,235 232 | "2006-08-19",NA,NA,235 233 | "2006-08-20",NA,NA,235 234 | "2006-08-21",NA,NA,235 235 | "2006-08-22",NA,NA,235 236 | "2006-08-23",NA,NA,235 237 | "2006-08-24",NA,NA,235 238 | "2006-08-25",NA,NA,235 239 | "2006-08-26",NA,NA,235 240 | "2006-08-27",NA,NA,235 241 | "2006-08-28",NA,NA,235 242 | "2006-08-29",NA,NA,235 243 | "2006-08-30",NA,NA,235 244 | "2006-08-31",NA,NA,235 245 | "2006-09-01",NA,NA,235 246 | "2006-09-02",NA,NA,235 247 | "2006-09-03",NA,NA,235 248 | "2006-09-04",NA,NA,235 249 | "2006-09-05",NA,NA,235 250 | "2006-09-06",NA,NA,235 251 | "2006-09-07",NA,NA,235 252 | "2006-09-08",NA,NA,235 253 | "2006-09-09",NA,NA,235 254 | "2006-09-10",NA,NA,235 255 | "2006-09-11",NA,NA,235 256 | "2006-09-12",NA,NA,235 257 | "2006-09-13",NA,NA,235 258 | "2006-09-14",NA,NA,235 259 | "2006-09-15",NA,NA,235 260 | "2006-09-16",NA,NA,235 261 | "2006-09-17",NA,NA,235 262 | "2006-09-18",NA,NA,235 263 | "2006-09-19",NA,NA,235 264 | "2006-09-20",NA,NA,235 265 | "2006-09-21",NA,NA,235 266 | "2006-09-22",NA,NA,235 267 | "2006-09-23",NA,NA,235 268 | "2006-09-24",NA,NA,235 269 | "2006-09-25",NA,NA,235 270 | "2006-09-26",NA,NA,235 271 | "2006-09-27",NA,NA,235 272 | "2006-09-28",NA,NA,235 273 | "2006-09-29",NA,NA,235 274 | "2006-09-30",NA,NA,235 275 | "2006-10-01",NA,NA,235 276 | "2006-10-02",NA,NA,235 277 | "2006-10-03",NA,NA,235 278 | "2006-10-04",NA,NA,235 279 | "2006-10-05",NA,NA,235 280 | "2006-10-06",NA,NA,235 281 | "2006-10-07",NA,NA,235 282 | "2006-10-08",NA,NA,235 283 | "2006-10-09",NA,NA,235 284 | "2006-10-10",NA,NA,235 285 | "2006-10-11",NA,NA,235 286 | "2006-10-12",NA,NA,235 287 | "2006-10-13",NA,NA,235 288 | "2006-10-14",NA,NA,235 289 | "2006-10-15",NA,NA,235 290 | "2006-10-16",NA,NA,235 291 | "2006-10-17",NA,NA,235 292 | "2006-10-18",NA,NA,235 293 | "2006-10-19",NA,NA,235 294 | "2006-10-20",NA,NA,235 295 | "2006-10-21",NA,NA,235 296 | "2006-10-22",NA,NA,235 297 | "2006-10-23",NA,NA,235 298 | "2006-10-24",NA,NA,235 299 | "2006-10-25",NA,NA,235 300 | "2006-10-26",NA,NA,235 301 | "2006-10-27",NA,NA,235 302 | "2006-10-28",NA,NA,235 303 | "2006-10-29",NA,NA,235 304 | "2006-10-30",NA,NA,235 305 | "2006-10-31",NA,NA,235 306 | "2006-11-01",NA,NA,235 307 | "2006-11-02",NA,NA,235 308 | "2006-11-03",NA,NA,235 309 | "2006-11-04",NA,NA,235 310 | "2006-11-05",NA,NA,235 311 | "2006-11-06",NA,NA,235 312 | "2006-11-07",NA,NA,235 313 | "2006-11-08",NA,NA,235 314 | "2006-11-09",NA,NA,235 315 | "2006-11-10",NA,NA,235 316 | "2006-11-11",NA,NA,235 317 | "2006-11-12",NA,NA,235 318 | "2006-11-13",NA,NA,235 319 | "2006-11-14",NA,NA,235 320 | "2006-11-15",NA,NA,235 321 | "2006-11-16",NA,NA,235 322 | "2006-11-17",NA,NA,235 323 | "2006-11-18",NA,NA,235 324 | "2006-11-19",NA,NA,235 325 | "2006-11-20",NA,NA,235 326 | "2006-11-21",NA,NA,235 327 | "2006-11-22",NA,NA,235 328 | "2006-11-23",NA,NA,235 329 | "2006-11-24",NA,NA,235 330 | "2006-11-25",NA,NA,235 331 | "2006-11-26",NA,NA,235 332 | "2006-11-27",NA,NA,235 333 | "2006-11-28",NA,NA,235 334 | "2006-11-29",NA,NA,235 335 | "2006-11-30",NA,NA,235 336 | "2006-12-01",NA,NA,235 337 | "2006-12-02",NA,NA,235 338 | "2006-12-03",NA,NA,235 339 | "2006-12-04",NA,NA,235 340 | "2006-12-05",NA,NA,235 341 | "2006-12-06",NA,NA,235 342 | "2006-12-07",NA,NA,235 343 | "2006-12-08",NA,NA,235 344 | "2006-12-09",NA,NA,235 345 | "2006-12-10",NA,NA,235 346 | "2006-12-11",NA,NA,235 347 | "2006-12-12",NA,NA,235 348 | "2006-12-13",NA,NA,235 349 | "2006-12-14",NA,NA,235 350 | "2006-12-15",NA,NA,235 351 | "2006-12-16",NA,NA,235 352 | "2006-12-17",NA,NA,235 353 | "2006-12-18",NA,NA,235 354 | "2006-12-19",NA,NA,235 355 | "2006-12-20",NA,NA,235 356 | "2006-12-21",NA,NA,235 357 | "2006-12-22",NA,NA,235 358 | "2006-12-23",NA,NA,235 359 | "2006-12-24",NA,NA,235 360 | "2006-12-25",NA,NA,235 361 | "2006-12-26",NA,NA,235 362 | "2006-12-27",NA,NA,235 363 | "2006-12-28",NA,NA,235 364 | "2006-12-29",NA,NA,235 365 | "2006-12-30",NA,NA,235 366 | "2006-12-31",NA,NA,235 367 | -------------------------------------------------------------------------------- /Programming Assignment 1 - Air Pollution/specdata/251.csv: -------------------------------------------------------------------------------- 1 | "Date","sulfate","nitrate","ID" 2 | "2001-01-01",NA,NA,251 3 | "2001-01-02",NA,NA,251 4 | "2001-01-03",NA,NA,251 5 | "2001-01-04",NA,NA,251 6 | "2001-01-05",NA,NA,251 7 | "2001-01-06",NA,NA,251 8 | "2001-01-07",NA,NA,251 9 | "2001-01-08",NA,NA,251 10 | "2001-01-09",NA,NA,251 11 | "2001-01-10",NA,NA,251 12 | "2001-01-11",NA,NA,251 13 | "2001-01-12",NA,NA,251 14 | "2001-01-13",NA,NA,251 15 | "2001-01-14",NA,NA,251 16 | "2001-01-15",NA,NA,251 17 | "2001-01-16",NA,NA,251 18 | "2001-01-17",NA,NA,251 19 | "2001-01-18",NA,NA,251 20 | "2001-01-19",NA,NA,251 21 | "2001-01-20",NA,NA,251 22 | "2001-01-21",NA,NA,251 23 | "2001-01-22",NA,NA,251 24 | "2001-01-23",NA,NA,251 25 | "2001-01-24",NA,NA,251 26 | "2001-01-25",NA,NA,251 27 | "2001-01-26",NA,NA,251 28 | "2001-01-27",NA,NA,251 29 | "2001-01-28",NA,NA,251 30 | "2001-01-29",NA,NA,251 31 | "2001-01-30",NA,NA,251 32 | "2001-01-31",NA,NA,251 33 | "2001-02-01",NA,NA,251 34 | "2001-02-02",NA,NA,251 35 | "2001-02-03",NA,NA,251 36 | "2001-02-04",NA,NA,251 37 | "2001-02-05",NA,NA,251 38 | "2001-02-06",NA,NA,251 39 | "2001-02-07",NA,NA,251 40 | "2001-02-08",NA,NA,251 41 | "2001-02-09",NA,NA,251 42 | "2001-02-10",NA,NA,251 43 | "2001-02-11",NA,NA,251 44 | "2001-02-12",NA,NA,251 45 | "2001-02-13",NA,NA,251 46 | "2001-02-14",NA,NA,251 47 | "2001-02-15",NA,NA,251 48 | "2001-02-16",NA,NA,251 49 | "2001-02-17",NA,NA,251 50 | "2001-02-18",NA,NA,251 51 | "2001-02-19",NA,NA,251 52 | "2001-02-20",NA,NA,251 53 | "2001-02-21",NA,NA,251 54 | "2001-02-22",NA,NA,251 55 | "2001-02-23",NA,NA,251 56 | "2001-02-24",NA,NA,251 57 | "2001-02-25",NA,NA,251 58 | "2001-02-26",NA,NA,251 59 | "2001-02-27",NA,NA,251 60 | "2001-02-28",NA,NA,251 61 | "2001-03-01",NA,NA,251 62 | "2001-03-02",NA,NA,251 63 | "2001-03-03",NA,NA,251 64 | "2001-03-04",NA,NA,251 65 | "2001-03-05",NA,NA,251 66 | "2001-03-06",NA,NA,251 67 | "2001-03-07",NA,NA,251 68 | "2001-03-08",NA,NA,251 69 | "2001-03-09",NA,NA,251 70 | "2001-03-10",NA,NA,251 71 | "2001-03-11",NA,NA,251 72 | "2001-03-12",NA,NA,251 73 | "2001-03-13",NA,NA,251 74 | "2001-03-14",NA,NA,251 75 | "2001-03-15",NA,NA,251 76 | "2001-03-16",NA,NA,251 77 | "2001-03-17",NA,NA,251 78 | "2001-03-18",NA,NA,251 79 | "2001-03-19",NA,NA,251 80 | "2001-03-20",NA,NA,251 81 | "2001-03-21",NA,NA,251 82 | "2001-03-22",NA,NA,251 83 | "2001-03-23",NA,NA,251 84 | "2001-03-24",NA,NA,251 85 | "2001-03-25",NA,NA,251 86 | "2001-03-26",NA,NA,251 87 | "2001-03-27",NA,NA,251 88 | "2001-03-28",NA,NA,251 89 | "2001-03-29",NA,NA,251 90 | "2001-03-30",NA,NA,251 91 | "2001-03-31",NA,NA,251 92 | "2001-04-01",NA,NA,251 93 | "2001-04-02",NA,NA,251 94 | "2001-04-03",NA,NA,251 95 | "2001-04-04",NA,NA,251 96 | "2001-04-05",NA,NA,251 97 | "2001-04-06",NA,NA,251 98 | "2001-04-07",NA,NA,251 99 | "2001-04-08",NA,NA,251 100 | "2001-04-09",NA,NA,251 101 | "2001-04-10",NA,NA,251 102 | "2001-04-11",NA,NA,251 103 | "2001-04-12",NA,NA,251 104 | "2001-04-13",NA,NA,251 105 | "2001-04-14",NA,NA,251 106 | "2001-04-15",NA,NA,251 107 | "2001-04-16",NA,NA,251 108 | "2001-04-17",NA,NA,251 109 | "2001-04-18",NA,NA,251 110 | "2001-04-19",NA,NA,251 111 | "2001-04-20",NA,NA,251 112 | "2001-04-21",NA,NA,251 113 | "2001-04-22",NA,NA,251 114 | "2001-04-23",NA,NA,251 115 | "2001-04-24",NA,NA,251 116 | "2001-04-25",NA,NA,251 117 | "2001-04-26",NA,NA,251 118 | "2001-04-27",NA,NA,251 119 | "2001-04-28",NA,NA,251 120 | "2001-04-29",NA,NA,251 121 | "2001-04-30",NA,NA,251 122 | "2001-05-01",NA,NA,251 123 | "2001-05-02",NA,NA,251 124 | "2001-05-03",NA,NA,251 125 | "2001-05-04",NA,NA,251 126 | "2001-05-05",NA,NA,251 127 | "2001-05-06",NA,NA,251 128 | "2001-05-07",NA,NA,251 129 | "2001-05-08",NA,NA,251 130 | "2001-05-09",NA,NA,251 131 | "2001-05-10",NA,NA,251 132 | "2001-05-11",NA,NA,251 133 | "2001-05-12",NA,NA,251 134 | "2001-05-13",NA,NA,251 135 | "2001-05-14",NA,NA,251 136 | "2001-05-15",NA,NA,251 137 | "2001-05-16",NA,NA,251 138 | "2001-05-17",NA,NA,251 139 | "2001-05-18",NA,NA,251 140 | "2001-05-19",NA,NA,251 141 | "2001-05-20",NA,NA,251 142 | "2001-05-21",NA,NA,251 143 | "2001-05-22",NA,NA,251 144 | "2001-05-23",NA,NA,251 145 | "2001-05-24",NA,NA,251 146 | "2001-05-25",NA,NA,251 147 | "2001-05-26",NA,NA,251 148 | "2001-05-27",NA,NA,251 149 | "2001-05-28",NA,NA,251 150 | "2001-05-29",NA,NA,251 151 | "2001-05-30",NA,NA,251 152 | "2001-05-31",NA,NA,251 153 | "2001-06-01",NA,NA,251 154 | "2001-06-02",NA,NA,251 155 | "2001-06-03",NA,NA,251 156 | "2001-06-04",NA,NA,251 157 | "2001-06-05",NA,NA,251 158 | "2001-06-06",NA,NA,251 159 | "2001-06-07",NA,NA,251 160 | "2001-06-08",NA,NA,251 161 | "2001-06-09",NA,NA,251 162 | "2001-06-10",NA,NA,251 163 | "2001-06-11",NA,NA,251 164 | "2001-06-12",NA,NA,251 165 | "2001-06-13",NA,NA,251 166 | "2001-06-14",NA,NA,251 167 | "2001-06-15",NA,NA,251 168 | "2001-06-16",NA,NA,251 169 | "2001-06-17",NA,NA,251 170 | "2001-06-18",NA,NA,251 171 | "2001-06-19",NA,NA,251 172 | "2001-06-20",NA,NA,251 173 | "2001-06-21",NA,NA,251 174 | "2001-06-22",NA,NA,251 175 | "2001-06-23",NA,NA,251 176 | "2001-06-24",NA,NA,251 177 | "2001-06-25",NA,NA,251 178 | "2001-06-26",NA,NA,251 179 | "2001-06-27",NA,NA,251 180 | "2001-06-28",NA,NA,251 181 | "2001-06-29",NA,NA,251 182 | "2001-06-30",NA,NA,251 183 | "2001-07-01",8.97,0.88,251 184 | "2001-07-02",1.15,0.174,251 185 | "2001-07-03",2.9,0.806,251 186 | "2001-07-04",6.94,0.908,251 187 | "2001-07-05",6.26,1.95,251 188 | "2001-07-06",1.91,0.581,251 189 | "2001-07-07",NA,NA,251 190 | "2001-07-08",9.46,0.877,251 191 | "2001-07-09",NA,NA,251 192 | "2001-07-10",11,0.87,251 193 | "2001-07-11",6.63,1.46,251 194 | "2001-07-12",NA,NA,251 195 | "2001-07-13",3.72,0.352,251 196 | "2001-07-14",3.07,0.227,251 197 | "2001-07-15",1.69,0.182,251 198 | "2001-07-16",3.1,0.328,251 199 | "2001-07-17",15.5,2.5,251 200 | "2001-07-18",NA,NA,251 201 | "2001-07-19",NA,NA,251 202 | "2001-07-20",1.72,0.662,251 203 | "2001-07-21",2.83,0.428,251 204 | "2001-07-22",4.06,0.988,251 205 | "2001-07-23",NA,NA,251 206 | "2001-07-24",6.11,0.649,251 207 | "2001-07-25",10.8,0.666,251 208 | "2001-07-26",2.64,0.441,251 209 | "2001-07-27",0.821,0.404,251 210 | "2001-07-28",NA,NA,251 211 | "2001-07-29",0.86,0.252,251 212 | "2001-07-30",1.41,0.359,251 213 | "2001-07-31",2.74,0.711,251 214 | "2001-08-01",5.41,0.714,251 215 | "2001-08-02",3.12,0.303,251 216 | "2001-08-03",5.78,0.484,251 217 | "2001-08-04",NA,NA,251 218 | "2001-08-05",NA,NA,251 219 | "2001-08-06",NA,NA,251 220 | "2001-08-07",NA,NA,251 221 | "2001-08-08",NA,NA,251 222 | "2001-08-09",NA,NA,251 223 | "2001-08-10",NA,NA,251 224 | "2001-08-11",NA,NA,251 225 | "2001-08-12",NA,NA,251 226 | "2001-08-13",NA,NA,251 227 | "2001-08-14",NA,NA,251 228 | "2001-08-15",NA,NA,251 229 | "2001-08-16",NA,NA,251 230 | "2001-08-17",NA,NA,251 231 | "2001-08-18",NA,NA,251 232 | "2001-08-19",NA,NA,251 233 | "2001-08-20",NA,NA,251 234 | "2001-08-21",NA,NA,251 235 | "2001-08-22",NA,NA,251 236 | "2001-08-23",NA,NA,251 237 | "2001-08-24",NA,NA,251 238 | "2001-08-25",NA,NA,251 239 | "2001-08-26",NA,NA,251 240 | "2001-08-27",NA,NA,251 241 | "2001-08-28",NA,NA,251 242 | "2001-08-29",NA,NA,251 243 | "2001-08-30",NA,NA,251 244 | "2001-08-31",NA,NA,251 245 | "2001-09-01",NA,NA,251 246 | "2001-09-02",NA,NA,251 247 | "2001-09-03",NA,NA,251 248 | "2001-09-04",NA,NA,251 249 | "2001-09-05",NA,NA,251 250 | "2001-09-06",NA,NA,251 251 | "2001-09-07",NA,NA,251 252 | "2001-09-08",NA,NA,251 253 | "2001-09-09",NA,NA,251 254 | "2001-09-10",NA,NA,251 255 | "2001-09-11",NA,NA,251 256 | "2001-09-12",NA,NA,251 257 | "2001-09-13",NA,NA,251 258 | "2001-09-14",NA,NA,251 259 | "2001-09-15",NA,NA,251 260 | "2001-09-16",NA,NA,251 261 | "2001-09-17",NA,NA,251 262 | "2001-09-18",NA,NA,251 263 | "2001-09-19",NA,NA,251 264 | "2001-09-20",NA,NA,251 265 | "2001-09-21",NA,NA,251 266 | "2001-09-22",NA,NA,251 267 | "2001-09-23",NA,NA,251 268 | "2001-09-24",NA,NA,251 269 | "2001-09-25",NA,NA,251 270 | "2001-09-26",NA,NA,251 271 | "2001-09-27",NA,NA,251 272 | "2001-09-28",NA,NA,251 273 | "2001-09-29",NA,NA,251 274 | "2001-09-30",NA,NA,251 275 | "2001-10-01",NA,NA,251 276 | "2001-10-02",NA,NA,251 277 | "2001-10-03",NA,NA,251 278 | "2001-10-04",NA,NA,251 279 | "2001-10-05",NA,NA,251 280 | "2001-10-06",NA,NA,251 281 | "2001-10-07",NA,NA,251 282 | "2001-10-08",NA,NA,251 283 | "2001-10-09",NA,NA,251 284 | "2001-10-10",NA,NA,251 285 | "2001-10-11",NA,NA,251 286 | "2001-10-12",NA,NA,251 287 | "2001-10-13",NA,NA,251 288 | "2001-10-14",NA,NA,251 289 | "2001-10-15",NA,NA,251 290 | "2001-10-16",NA,NA,251 291 | "2001-10-17",NA,NA,251 292 | "2001-10-18",NA,NA,251 293 | "2001-10-19",NA,NA,251 294 | "2001-10-20",NA,NA,251 295 | "2001-10-21",NA,NA,251 296 | "2001-10-22",NA,NA,251 297 | "2001-10-23",NA,NA,251 298 | "2001-10-24",NA,NA,251 299 | "2001-10-25",NA,NA,251 300 | "2001-10-26",NA,NA,251 301 | "2001-10-27",NA,NA,251 302 | "2001-10-28",NA,NA,251 303 | "2001-10-29",NA,NA,251 304 | "2001-10-30",NA,NA,251 305 | "2001-10-31",NA,NA,251 306 | "2001-11-01",NA,NA,251 307 | "2001-11-02",NA,NA,251 308 | "2001-11-03",NA,NA,251 309 | "2001-11-04",NA,NA,251 310 | "2001-11-05",NA,NA,251 311 | "2001-11-06",NA,NA,251 312 | "2001-11-07",NA,NA,251 313 | "2001-11-08",NA,NA,251 314 | "2001-11-09",NA,NA,251 315 | "2001-11-10",NA,NA,251 316 | "2001-11-11",NA,NA,251 317 | "2001-11-12",NA,NA,251 318 | "2001-11-13",NA,NA,251 319 | "2001-11-14",NA,NA,251 320 | "2001-11-15",NA,NA,251 321 | "2001-11-16",NA,NA,251 322 | "2001-11-17",NA,NA,251 323 | "2001-11-18",NA,NA,251 324 | "2001-11-19",NA,NA,251 325 | "2001-11-20",NA,NA,251 326 | "2001-11-21",NA,NA,251 327 | "2001-11-22",NA,NA,251 328 | "2001-11-23",NA,NA,251 329 | "2001-11-24",NA,NA,251 330 | "2001-11-25",NA,NA,251 331 | "2001-11-26",NA,NA,251 332 | "2001-11-27",NA,NA,251 333 | "2001-11-28",NA,NA,251 334 | "2001-11-29",NA,NA,251 335 | "2001-11-30",NA,NA,251 336 | "2001-12-01",NA,NA,251 337 | "2001-12-02",NA,NA,251 338 | "2001-12-03",NA,NA,251 339 | "2001-12-04",NA,NA,251 340 | "2001-12-05",NA,NA,251 341 | "2001-12-06",NA,NA,251 342 | "2001-12-07",NA,NA,251 343 | "2001-12-08",NA,NA,251 344 | "2001-12-09",NA,NA,251 345 | "2001-12-10",NA,NA,251 346 | "2001-12-11",NA,NA,251 347 | "2001-12-12",NA,NA,251 348 | "2001-12-13",NA,NA,251 349 | "2001-12-14",NA,NA,251 350 | "2001-12-15",NA,NA,251 351 | "2001-12-16",NA,NA,251 352 | "2001-12-17",NA,NA,251 353 | "2001-12-18",NA,NA,251 354 | "2001-12-19",NA,NA,251 355 | "2001-12-20",NA,NA,251 356 | "2001-12-21",NA,NA,251 357 | "2001-12-22",NA,NA,251 358 | "2001-12-23",NA,NA,251 359 | "2001-12-24",NA,NA,251 360 | "2001-12-25",NA,NA,251 361 | "2001-12-26",NA,NA,251 362 | "2001-12-27",NA,NA,251 363 | "2001-12-28",NA,NA,251 364 | "2001-12-29",NA,NA,251 365 | "2001-12-30",NA,NA,251 366 | "2001-12-31",NA,NA,251 367 | -------------------------------------------------------------------------------- /Programming Assignment 1 - Air Pollution/specdata/complete.R: -------------------------------------------------------------------------------- 1 | complete <- function(directory, id = 1:332) { 2 | ## 'directory' is a character vector of length 1 indicating 3 | ## the location of the CSV files 4 | 5 | ## 'id' is an integer vector indicating the monitor ID numbers 6 | ## to be used 7 | 8 | ## Return a data frame of the form: 9 | ## id nobs 10 | ## 1 117 11 | ## 2 1041 12 | ## ... 13 | ## where 'id' is the monitor ID number and 'nobs' is the 14 | ## number of complete cases 15 | 16 | filename <- vector(mode="character", length=length(id)) 17 | for(i in seq_along(id)) { 18 | x <- id[i] 19 | id_string <- toString(x) 20 | if (x >= 1 && x <= 9) { 21 | monitor <- paste("00", id_string, ".csv", sep="") 22 | } 23 | else if (x >= 10 && x <= 99) { 24 | id_string <- toString(x) 25 | monitor <- paste("0", id_string, ".csv", sep="") 26 | } 27 | else { 28 | id_string <- toString(x) 29 | monitor <- paste(id_string, ".csv", sep="") 30 | } 31 | filename[i] <- monitor 32 | #print(monitor) 33 | } 34 | 35 | #accumulator <- 0 36 | nobs <- vector(mode="integer", length=length(id)) 37 | for(i in seq(filename)) { 38 | airquality <- read.csv(filename[i]) 39 | good <- complete.cases(airquality) 40 | airquality <- airquality[good, ] 41 | nobs[i] <- nrow(airquality) 42 | #accumulator <- accumulator + sum(airquality[pollutant], na.rm = TRUE) 43 | } 44 | result = data.frame(id, nobs) 45 | result 46 | } -------------------------------------------------------------------------------- /Programming Assignment 1 - Air Pollution/specdata/corr.R: -------------------------------------------------------------------------------- 1 | corr <- function(directory, threshold = 0) { 2 | ## 'directory' is a character vector of length 1 indicating 3 | ## the location of the CSV files 4 | 5 | ## 'threshold' is a numeric vector of length 1 indicating the 6 | ## number of completely observed observations (on all 7 | ## variables) required to compute the correlation between 8 | ## nitrate and sulfate; the default is 0 9 | 10 | ## Return a numeric vector of correlations 11 | 12 | id = 1:332 13 | filename <- vector(mode="character", length=length(id)) 14 | for(i in seq_along(id)) { 15 | x <- id[i] 16 | id_string <- toString(x) 17 | if (x >= 1 && x <= 9) { 18 | monitor <- paste("00", id_string, ".csv", sep="") 19 | } 20 | else if (x >= 10 && x <= 99) { 21 | id_string <- toString(x) 22 | monitor <- paste("0", id_string, ".csv", sep="") 23 | } 24 | else { 25 | id_string <- toString(x) 26 | monitor <- paste(id_string, ".csv", sep="") 27 | } 28 | filename[i] <- monitor 29 | } 30 | #print(filename) 31 | 32 | #empty vector 33 | result <-vector(mode="numeric", length=0) 34 | for(i in seq(filename)) { 35 | airquality <- read.csv(filename[i]) 36 | good <- complete.cases(airquality) 37 | airquality <- airquality[good, ] 38 | if (nrow(airquality) > threshold) { 39 | # We need [[]] around pollutant instead of [] since airquality["sulfate"] 40 | # is a data.frame but we need a vector here. Hence, [[]]. Please note that using either 41 | #[[]] or [] gives the same results as the test cases 42 | correlation <- cor(airquality[["sulfate"]], airquality[["nitrate"]]) 43 | result <- append(result, correlation) 44 | #print(correlation) 45 | } 46 | } 47 | result 48 | } 49 | -------------------------------------------------------------------------------- /Programming Assignment 1 - Air Pollution/specdata/pollutantmean.R: -------------------------------------------------------------------------------- 1 | pollutantmean <- function(directory, pollutant, id = 1:332) { 2 | ## 'directory' is a character vector of length 1 indicating 3 | ## the location of the CSV files 4 | 5 | ## 'pollutant' is a character vector of length 1 indicating 6 | ## the name of the pollutant for which we will calculate the 7 | ## mean; either "sulfate" or "nitrate". 8 | 9 | ## 'id' is an integer vector indicating the monitor ID numbers 10 | ## to be used 11 | 12 | ## Return the mean of the pollutant across all monitors list 13 | ## in the 'id' vector (ignoring NA values) 14 | 15 | filename <- vector(mode="character", length=length(id)) 16 | for(i in seq_along(id)) { 17 | x <- id[i] 18 | id_string <- toString(x) 19 | if (x >= 1 && x <= 9) { 20 | monitor <- paste("00", id_string, ".csv", sep="") 21 | } 22 | else if (x >= 10 && x <= 99) { 23 | id_string <- toString(x) 24 | monitor <- paste("0", id_string, ".csv", sep="") 25 | } 26 | else { 27 | id_string <- toString(x) 28 | monitor <- paste(id_string, ".csv", sep="") 29 | } 30 | filename[i] <- monitor 31 | #print(monitor) 32 | } 33 | 34 | accumulator <- 0 35 | total <- 0 36 | for(i in filename) { 37 | airquality <- read.csv(i) 38 | good <- complete.cases(airquality[pollutant]) 39 | #good <- complete.cases(airquality[[pollutant]]) 40 | airquality <- airquality[good, ] 41 | total <- total + nrow(airquality) 42 | #accumulator <- accumulator + sum(airquality[pollutant], na.rm = TRUE) 43 | # We need [[]] around pollutant instead of [] since airquality[pollutant] 44 | # is a data.frame but we need a vector here. Please note that using either 45 | #[[]] or [] gives the same results as the test cases but only [[]] successfully 46 | #passes the submit() script 47 | accumulator <- accumulator + sum(airquality[[pollutant]], na.rm = TRUE) 48 | } 49 | accumulator/total 50 | } 51 | -------------------------------------------------------------------------------- /Programming Assignment 1 - Air Pollution/specdata/submitscript1.R: -------------------------------------------------------------------------------- 1 | checkPkgs <- function() { 2 | pkg.inst <- installed.packages() 3 | pkgs <- c("RCurl", "digest") 4 | have.pkg <- pkgs %in% rownames(pkg.inst) 5 | 6 | if(any(!have.pkg)) { 7 | cat("Some packages need to be installed\n") 8 | r <- readline("Install necessary packages [y/n]? ") 9 | if(tolower(r) == "y") { 10 | need <- pkgs[!have.pkg] 11 | message("installing packages ", 12 | paste(need, collapse = ", ")) 13 | install.packages(need) 14 | } 15 | } 16 | } 17 | 18 | checkPkgs() 19 | 20 | CLASS <- "rprog-003" 21 | challenge.url <- paste("http://class.coursera.org", CLASS, 22 | "assignment/challenge", sep = "/") 23 | submit.url <- paste("http://class.coursera.org", CLASS, 24 | "assignment/submit", sep = "/") 25 | 26 | loginPrompt <- function() { 27 | email <- readline("Submission login (email): ") 28 | passwd <- readline("Submission password: ") 29 | r <- list(email = email, passwd = passwd) 30 | assign(".CourseraLogin", r, globalenv()) 31 | invisible(r) 32 | } 33 | 34 | submit <- function(manual = FALSE, resetLogin = FALSE) { 35 | library(RCurl) 36 | library(digest) 37 | if(!manual) { 38 | if(exists(".CourseraLogin") && !resetLogin) 39 | cred <- get(".CourseraLogin") 40 | else 41 | cred <- loginPrompt() 42 | if(!is.list(cred) || !(names(cred) %in% c("email", "passwd"))) 43 | stop("problem with login/password") 44 | email <- cred$email 45 | password <- cred$passwd 46 | } 47 | ## Prompt Submission Part 48 | sid <- partPrompt() 49 | 50 | ## Get output 51 | output <- getOutput(sid) 52 | 53 | if(!manual) { 54 | ## Get challenge 55 | ch <- getChallenge(email) 56 | 57 | ## Attempt submission with challenge 58 | ch.resp <- challengeResponse(password, ch$ch.key) 59 | results <- submitSolution(email, ch.resp, sid, output, ch$state) 60 | if(!length(results)) 61 | results <- "Incorrect!" 62 | cat("Result: ", results, "\n") 63 | } 64 | else { 65 | outfile <- paste(sid, "output.txt", sep = "-") 66 | writeLines(as.character(output), outfile) 67 | cat(sprintf("Please upload the file '%s' to Coursera\n", 68 | outfile)) 69 | } 70 | invisible() 71 | } 72 | 73 | getOutput <- function(sid) { 74 | ## JUST FOR TESTING 75 | ### sid <- sub("-dev", "", sid, fixed = TRUE) 76 | if(sid == "pollutantmean-1") { 77 | source("pollutantmean.R") 78 | pollutantmean("specdata", "sulfate", 1:10) 79 | } 80 | else if(sid == "pollutantmean-2") { 81 | source("pollutantmean.R") 82 | pollutantmean("specdata", "nitrate", 70:72) 83 | } 84 | else if(sid == "pollutantmean-3") { 85 | source("pollutantmean.R") 86 | pollutantmean("specdata", "sulfate", 34) 87 | } 88 | else if(sid == "pollutantmean-4") { 89 | source("pollutantmean.R") 90 | pollutantmean("specdata", "nitrate") 91 | } 92 | else if(sid == "complete-1") { 93 | source("complete.R") 94 | cc <- complete("specdata", c(6, 10, 20, 34, 100, 200, 310)) 95 | paste(cc$nobs, collapse = "\n") 96 | } 97 | else if(sid == "complete-2") { 98 | source("complete.R") 99 | cc <- complete("specdata", 54) 100 | cc$nobs 101 | } 102 | else if(sid == "complete-3") { 103 | source("complete.R") 104 | set.seed(42) 105 | cc <- complete("specdata", 332:1) 106 | use <- sample(332, 10) 107 | paste(cc[use, "nobs"], collapse = "\n") 108 | } 109 | else if(sid == "corr-1") { 110 | source("corr.R") 111 | cr <- corr("specdata") 112 | cr <- sort(cr) 113 | set.seed(868) 114 | out <- round(cr[sample(length(cr), 5)], 4) 115 | paste(out, collapse = "\n") 116 | } 117 | else if(sid == "corr-2") { 118 | source("corr.R") 119 | cr <- corr("specdata", 129) 120 | cr <- sort(cr) 121 | n <- length(cr) 122 | set.seed(197) 123 | out <- c(n, round(cr[sample(n, 5)], 4)) 124 | paste(out, collapse = "\n") 125 | 126 | } 127 | else if(sid == "corr-3") { 128 | source("corr.R") 129 | cr <- corr("specdata", 2000) 130 | n <- length(cr) 131 | cr <- corr("specdata", 1000) 132 | cr <- sort(cr) 133 | paste(c(n, round(cr, 4)), collapse = "\n") 134 | } 135 | else { 136 | stop("invalid part number") 137 | } 138 | } 139 | 140 | partPrompt <- function() { 141 | sid <- c("pollutantmean-1", 142 | "pollutantmean-2", 143 | "pollutantmean-3", 144 | "pollutantmean-4", 145 | "complete-1", 146 | "complete-2", 147 | "complete-3", 148 | "corr-1", 149 | "corr-2", 150 | "corr-3" 151 | ) 152 | ## JUST FOR TESTING 153 | ## sid <- paste(sid, "dev", sep = "-") 154 | 155 | sidname <- c("'pollutantmean' part 1", 156 | "'pollutantmean' part 2", 157 | "'pollutantmean' part 3", 158 | "'pollutantmean' part 4", 159 | "'complete' part 1", 160 | "'complete' part 2", 161 | "'complete' part 3", 162 | "'corr' part 1", 163 | "'corr' part 2", 164 | "'corr' part 3" 165 | ) 166 | numparts <- length(sid) 167 | cat(paste(paste("[", seq_len(numparts), "]", sep = ""), sidname), 168 | sep = "\n") 169 | partnum <- readline(sprintf("Which part are you submitting [1-%d]? ", 170 | numparts)) 171 | partnum <- as.integer(partnum) 172 | if(is.na(partnum)) 173 | stop("please specify part number") 174 | if(partnum > numparts) 175 | stop("invalid part number") 176 | sid[partnum] 177 | } 178 | 179 | getChallenge <- function(email) { 180 | params <- list(email_address = email, response_encoding = "delim") 181 | result <- getForm(challenge.url, .params = params) 182 | s <- strsplit(result, "|", fixed = TRUE)[[1]] 183 | list(ch.key = s[5], state = s[7]) 184 | } 185 | 186 | challengeResponse <- function(password, ch.key) { 187 | x <- paste(ch.key, password, sep = "") 188 | digest(x, algo = "sha1", serialize = FALSE) 189 | } 190 | 191 | submitSolution <- function(email, ch.resp, sid, output, signature, src = "", 192 | http.version = NULL) { 193 | output <- as.character(base64(output)) 194 | src <- as.character(base64(src)) 195 | params <- list(assignment_part_sid = sid, 196 | email_address = email, 197 | submission = output, 198 | submission_aux = src, 199 | challenge_response = ch.resp, 200 | state = signature) 201 | params <- lapply(params, URLencode) 202 | result <- postForm(submit.url, .params = params) 203 | s <- strsplit(result, "\\r\\n")[[1]] 204 | tail(s, 1) 205 | } 206 | -------------------------------------------------------------------------------- /Programming Assignment 1 - Air Pollution/submitscript1.R: -------------------------------------------------------------------------------- 1 | checkPkgs <- function() { 2 | pkg.inst <- installed.packages() 3 | pkgs <- c("RCurl", "digest") 4 | have.pkg <- pkgs %in% rownames(pkg.inst) 5 | 6 | if(any(!have.pkg)) { 7 | cat("Some packages need to be installed\n") 8 | r <- readline("Install necessary packages [y/n]? ") 9 | if(tolower(r) == "y") { 10 | need <- pkgs[!have.pkg] 11 | message("installing packages ", 12 | paste(need, collapse = ", ")) 13 | install.packages(need) 14 | } 15 | } 16 | } 17 | 18 | checkPkgs() 19 | 20 | CLASS <- "rprog-003" 21 | challenge.url <- paste("http://class.coursera.org", CLASS, 22 | "assignment/challenge", sep = "/") 23 | submit.url <- paste("http://class.coursera.org", CLASS, 24 | "assignment/submit", sep = "/") 25 | 26 | loginPrompt <- function() { 27 | email <- readline("Submission login (email): ") 28 | passwd <- readline("Submission password: ") 29 | r <- list(email = email, passwd = passwd) 30 | assign(".CourseraLogin", r, globalenv()) 31 | invisible(r) 32 | } 33 | 34 | submit <- function(manual = FALSE, resetLogin = FALSE) { 35 | library(RCurl) 36 | library(digest) 37 | if(!manual) { 38 | if(exists(".CourseraLogin") && !resetLogin) 39 | cred <- get(".CourseraLogin") 40 | else 41 | cred <- loginPrompt() 42 | if(!is.list(cred) || !(names(cred) %in% c("email", "passwd"))) 43 | stop("problem with login/password") 44 | email <- cred$email 45 | password <- cred$passwd 46 | } 47 | ## Prompt Submission Part 48 | sid <- partPrompt() 49 | 50 | ## Get output 51 | output <- getOutput(sid) 52 | 53 | if(!manual) { 54 | ## Get challenge 55 | ch <- getChallenge(email) 56 | 57 | ## Attempt submission with challenge 58 | ch.resp <- challengeResponse(password, ch$ch.key) 59 | results <- submitSolution(email, ch.resp, sid, output, ch$state) 60 | if(!length(results)) 61 | results <- "Incorrect!" 62 | cat("Result: ", results, "\n") 63 | } 64 | else { 65 | outfile <- paste(sid, "output.txt", sep = "-") 66 | writeLines(as.character(output), outfile) 67 | cat(sprintf("Please upload the file '%s' to Coursera\n", 68 | outfile)) 69 | } 70 | invisible() 71 | } 72 | 73 | getOutput <- function(sid) { 74 | ## JUST FOR TESTING 75 | ### sid <- sub("-dev", "", sid, fixed = TRUE) 76 | if(sid == "pollutantmean-1") { 77 | source("pollutantmean.R") 78 | pollutantmean("specdata", "sulfate", 1:10) 79 | } 80 | else if(sid == "pollutantmean-2") { 81 | source("pollutantmean.R") 82 | pollutantmean("specdata", "nitrate", 70:72) 83 | } 84 | else if(sid == "pollutantmean-3") { 85 | source("pollutantmean.R") 86 | pollutantmean("specdata", "sulfate", 34) 87 | } 88 | else if(sid == "pollutantmean-4") { 89 | source("pollutantmean.R") 90 | pollutantmean("specdata", "nitrate") 91 | } 92 | else if(sid == "complete-1") { 93 | source("complete.R") 94 | cc <- complete("specdata", c(6, 10, 20, 34, 100, 200, 310)) 95 | paste(cc$nobs, collapse = "\n") 96 | } 97 | else if(sid == "complete-2") { 98 | source("complete.R") 99 | cc <- complete("specdata", 54) 100 | cc$nobs 101 | } 102 | else if(sid == "complete-3") { 103 | source("complete.R") 104 | set.seed(42) 105 | cc <- complete("specdata", 332:1) 106 | use <- sample(332, 10) 107 | paste(cc[use, "nobs"], collapse = "\n") 108 | } 109 | else if(sid == "corr-1") { 110 | source("corr.R") 111 | cr <- corr("specdata") 112 | cr <- sort(cr) 113 | set.seed(868) 114 | out <- round(cr[sample(length(cr), 5)], 4) 115 | paste(out, collapse = "\n") 116 | } 117 | else if(sid == "corr-2") { 118 | source("corr.R") 119 | cr <- corr("specdata", 129) 120 | cr <- sort(cr) 121 | n <- length(cr) 122 | set.seed(197) 123 | out <- c(n, round(cr[sample(n, 5)], 4)) 124 | paste(out, collapse = "\n") 125 | 126 | } 127 | else if(sid == "corr-3") { 128 | source("corr.R") 129 | cr <- corr("specdata", 2000) 130 | n <- length(cr) 131 | cr <- corr("specdata", 1000) 132 | cr <- sort(cr) 133 | paste(c(n, round(cr, 4)), collapse = "\n") 134 | } 135 | else { 136 | stop("invalid part number") 137 | } 138 | } 139 | 140 | partPrompt <- function() { 141 | sid <- c("pollutantmean-1", 142 | "pollutantmean-2", 143 | "pollutantmean-3", 144 | "pollutantmean-4", 145 | "complete-1", 146 | "complete-2", 147 | "complete-3", 148 | "corr-1", 149 | "corr-2", 150 | "corr-3" 151 | ) 152 | ## JUST FOR TESTING 153 | ## sid <- paste(sid, "dev", sep = "-") 154 | 155 | sidname <- c("'pollutantmean' part 1", 156 | "'pollutantmean' part 2", 157 | "'pollutantmean' part 3", 158 | "'pollutantmean' part 4", 159 | "'complete' part 1", 160 | "'complete' part 2", 161 | "'complete' part 3", 162 | "'corr' part 1", 163 | "'corr' part 2", 164 | "'corr' part 3" 165 | ) 166 | numparts <- length(sid) 167 | cat(paste(paste("[", seq_len(numparts), "]", sep = ""), sidname), 168 | sep = "\n") 169 | partnum <- readline(sprintf("Which part are you submitting [1-%d]? ", 170 | numparts)) 171 | partnum <- as.integer(partnum) 172 | if(is.na(partnum)) 173 | stop("please specify part number") 174 | if(partnum > numparts) 175 | stop("invalid part number") 176 | sid[partnum] 177 | } 178 | 179 | getChallenge <- function(email) { 180 | params <- list(email_address = email, response_encoding = "delim") 181 | result <- getForm(challenge.url, .params = params) 182 | s <- strsplit(result, "|", fixed = TRUE)[[1]] 183 | list(ch.key = s[5], state = s[7]) 184 | } 185 | 186 | challengeResponse <- function(password, ch.key) { 187 | x <- paste(ch.key, password, sep = "") 188 | digest(x, algo = "sha1", serialize = FALSE) 189 | } 190 | 191 | submitSolution <- function(email, ch.resp, sid, output, signature, src = "", 192 | http.version = NULL) { 193 | output <- as.character(base64(output)) 194 | src <- as.character(base64(src)) 195 | params <- list(assignment_part_sid = sid, 196 | email_address = email, 197 | submission = output, 198 | submission_aux = src, 199 | challenge_response = ch.resp, 200 | state = signature) 201 | params <- lapply(params, URLencode) 202 | result <- postForm(submit.url, .params = params) 203 | s <- strsplit(result, "\\r\\n")[[1]] 204 | tail(s, 1) 205 | } 206 | -------------------------------------------------------------------------------- /Programming Assignment 2 - Lexical Scoping/Here's how makeVector and cachemean work_files/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muntasir2165/R-Programming-Assignments-1--2--and-3-/3dd6003062ddf6851a2baa06b04ed96e9eabfb60/Programming Assignment 2 - Lexical Scoping/Here's how makeVector and cachemean work_files/1.jpg -------------------------------------------------------------------------------- /Programming Assignment 2 - Lexical Scoping/Here's how makeVector and cachemean work_files/172.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muntasir2165/R-Programming-Assignments-1--2--and-3-/3dd6003062ddf6851a2baa06b04ed96e9eabfb60/Programming Assignment 2 - Lexical Scoping/Here's how makeVector and cachemean work_files/172.jpg -------------------------------------------------------------------------------- /Programming Assignment 2 - Lexical Scoping/Here's how makeVector and cachemean work_files/204.min.js: -------------------------------------------------------------------------------- 1 | !function(e){var t=/.*\/204\.(min\.)?js(\?.*)?$/,n=4e3,o=function(t){var n=[];for(var o in t)n.push("string"!=typeof t[o]&&e.JSON?o+"="+encodeURIComponent(e.JSON.stringify(t[o])):o+"="+encodeURIComponent(t[o].toString()));return e.JSON||n.push("_noJSON_=true"),n.join("&")},i=function(t,n,o){var i=document.createElement("iframe"),r=(new Date).getTime().toString();document.body.appendChild(i),i.style.display="none",i.name=r,i.contentWindow.name=r;var s=document.createElement("div");s.style.display="none";var a=document.createElement("form");a.target=r,a.action=t,a.method="POST",s.appendChild(a);var c;for(var p in n)c=document.createElement("input"),c.type="hidden",c.name=p,c.value="string"!=typeof n[p]&&e.JSON?e.JSON.stringify(n[p]):n[p].toString(),a.appendChild(c);document.body.appendChild(s),i.onload=i.onreadystatechange=function(){this.readyState&&"complete"!=this.readyState||(i.onreadystatechange=i.onload=null,i.parentNode.removeChild(i),a.parentNode.removeChild(a),o&&"function"==typeof o&&o())},a.submit()},r=function(e,t,n,o){var r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src=e+"?"+n,r.onload=r.onreadystatechange=function(){this.readyState&&"complete"!=this.readyState||(r.onreadystatechange=r.onload=null,r.parentNode.removeChild(r),o&&"function"==typeof o&&o())},r.onerror=function(){i(e,t,o)},document.getElementsByTagName("head")[0].appendChild(r)},s=function(e,t,s){var a=o(t);a.length=0;n--)c.remove(e[n],t)},h=function(e){e.options.session=e.session();var t=e.options.initialReferrerTracker,n={domain:e.options.domain,days:365};e.options.initialReferrer=c.setOnce(t,e.options.from,n)},u=function(){for(var n=e.document.scripts||document.getElementsByTagName("script"),o=n.length,i=e.document.referrer,r=e.location.host.split(".");r.length>2;)r.shift();this.options={user:null,version:null,session:null,client:"204",from:i,domain:"."+r.join("."),currentURL:e.location.href,tracker:"__204u",initialReferrerTracker:"__204r",beacon:"https://eventing.coursera.org/info"};for(var s=0;o>s;s++)if(t.test(n[s].src)){var a=/^.+\?(.*)$/.exec(n[s].src);if(a)for(var c=a[1].split("&"),p=0;p")}("ribbon"in locals_for_with?locals_for_with.ribbon:"undefined"!=typeof ribbon?ribbon:void 0,"certBaseImage"in locals_for_with?locals_for_with.certBaseImage:"undefined"!=typeof certBaseImage?certBaseImage:void 0,"universityLogo"in locals_for_with?locals_for_with.universityLogo:"undefined"!=typeof universityLogo?universityLogo:void 0,"course"in locals_for_with?locals_for_with.course:"undefined"!=typeof course?course:void 0,"closeDate"in locals_for_with?locals_for_with.closeDate:"undefined"!=typeof closeDate?closeDate:void 0,"timeLeft"in locals_for_with?locals_for_with.timeLeft:"undefined"!=typeof timeLeft?timeLeft:void 0),buf.join("")};return function(locals){if(locals&&locals._t)_t=locals._t.merge(_t);return yudify(locals)}};if("function"==typeof define&&define.amd)define(["js/lib/jade"],function(jade,_t){return jadify(jade,_t)});else wndw.jade.templates["spark.app.signature.js.flexjoinLastChanceModal"]=jadify(wndw.jade.helpers)}(window); -------------------------------------------------------------------------------- /Programming Assignment 2 - Lexical Scoping/Here's how makeVector and cachemean work_files/header(1).js: -------------------------------------------------------------------------------- 1 | define({es:!0,fr:!0,pt:!0,ru:!0,tr:!0,zh:!0,"zh-hk":"zh-tw","zh-mo":"zh-tw","zh-tw":!0}); -------------------------------------------------------------------------------- /Programming Assignment 2 - Lexical Scoping/Here's how makeVector and cachemean work_files/header.js: -------------------------------------------------------------------------------- 1 | define(["underscore","backbone","js/lib/readme","pages/spark/app","i18n!pages/spark/views/template/nls/header","pages/spark/views/template/header.html"],function(_,Backbone,Readme,Coursera,_t,template){"use strict";var header=Backbone.View.extend({name:"header",className:"coursera-header",attributes:{role:"menubar"},initialize:function(){this.on("view:appended",function(){try{var dashboardLink="data/dashboard",onDashboardAlready=-1!==window.location.pathname.indexOf(dashboardLink,window.location.pathname.length-dashboardLink.length);if(!onDashboardAlready){for(var readmeLinks=$("[data-readme=data-dashboard-announcement] a"),i=0;i=max)return this.emitter.trigger("aged"),!1;if(_private.open)return _private.stack.push(this),!1;else return _private.open=!0,!0}},ReadMe=function(el,options){var that=this;this.$el=$(el),this.emitter=LucidJS.emitter(this),this.customize(options),window.setTimeout(function(){that.open()},this.options["show.delay"]||0)};ReadMe.prototype.customize=function(settings){var that=this,height;if(this.options=_.extend({},DataAttributes.parse(this.$el,_private.defaults,"data-readme-"),settings),this.$el.addClass(this.options["class"]),"banner"==this.options.type)this.$el.css({visibility:"hidden"}).show(),height=this.$el.outerHeight(),this.$el.css({visibility:"visible"}).hide(),this.options["animate.open"]={"margin-top":0},this.options["animate.close"]={"margin-top":-height},this.options["animate.duration"]=250,this.on("opening",function(){that.$el.css({visibility:"visible","margin-top":-height}).show().prependTo($("body"))});else if("footer-sticky"==this.options.type)this.$el.css({visibility:"hidden"}).show(),height=this.$el.outerHeight(),this.$el.css({visibility:"visible"}).hide(),this.options["animate.open"]={bottom:0},this.options["animate.close"]={bottom:-height},this.options["animate.duration"]=250,this.on("opening",function(){that.$el.css({visibility:"visible",position:"absolute",left:0,right:0,bottom:-height}).show().appendTo($("body"))});return this},ReadMe.prototype.open=function(){var that=this;if(_private.canShow.call(this)){if(!this.options["show.until.closed"]&&this.options["show.count"])_private.increaseCount.call(this);if(this.emitter.trigger("opening"),_private.stack.push(this),this.$el.on(this.options["bind.close"]+".readme","["+this.options["attribute.close"]+"]",function(){if(that.options["show.until.closed"]&&that.options["show.count"])_private.increaseCount.call(that);that.close()}),this.$el.is("["+this.options["attribute.close"]+"]"))this.$el.on(this.options["bind.close"]+".readme",function(){if(that.options["show.until.closed"]&&that.options["show.count"])_private.increaseCount.call(that);that.close()});if(this.options["animate.open"])this.$el.css({"margin-top":-100}).prependTo($("body")).show(),this.$el.animate(this.options["animate.open"],{duration:this.options["animate.duration"],complete:function(){that.emitter.trigger("open")}});else this.$el.show(),this.emitter.trigger("open")}},ReadMe.prototype.close=function(){var that=this;if(this.trigger("closing"),_private.stack.shift(),this.options["animate.close"])this.$el.animate(this.options["animate.close"],{duration:this.options["animate.duration"],complete:function(){if(that.$el.off(".readme"),that.$el.hide().remove(),that.emitter.trigger("close"),_private.open=!1,_private.stack.length)_private.stack[0].open()}});else if(this.$el.off(".readme"),this.$el.hide().remove(),this.emitter.trigger("close"),_private.open=!1,_private.stack.length)_private.stack[0].open()};var external=function(el,options){return _private.getReadMe(el,options)||_private.makeReadMe(el,options)};return external};if("function"==typeof define&&define.amd)define(["jquery","underscore","js/lib/cookie","js/lib/lucid","js/lib/moment","js/lib/data.attributes"],function($,_,cookie,LucidJS,Moment,DataAttributes){return Module($,_,cookie,LucidJS,Moment,DataAttributes)});else if("undefined"!=typeof window&&"undefined"==typeof ender)wndw.ReadMe=Module(wndw.$,wndw._,wndw.Cookie,wndw.LucidJS,wndw.moment,wndw.DataAttributes)}(window); -------------------------------------------------------------------------------- /Programming Assignment 2 - Lexical Scoping/Here's how makeVector and cachemean work_files/sidebar(1).js: -------------------------------------------------------------------------------- 1 | define({es:!0,fr:!0,pt:!0,ru:!0,tr:!0,zh:!0,"zh-hk":"zh-tw","zh-mo":"zh-tw","zh-tw":!0}); -------------------------------------------------------------------------------- /Programming Assignment 2 - Lexical Scoping/Here's how makeVector and cachemean work_files/sidebar.html.js: -------------------------------------------------------------------------------- 1 | !function(wndw){var jadify=function(jade,_t){var yudify=function template(locals){var buf=[],jade_mixins={},jade_interp,locals_for_with=locals||{};return function(course,user,config,_t,navbar,Date,url){if(buf.push('")}("course"in locals_for_with?locals_for_with.course:"undefined"!=typeof course?course:void 0,"user"in locals_for_with?locals_for_with.user:"undefined"!=typeof user?user:void 0,"config"in locals_for_with?locals_for_with.config:"undefined"!=typeof config?config:void 0,"_t"in locals_for_with?locals_for_with._t:"undefined"!=typeof _t?_t:void 0,"navbar"in locals_for_with?locals_for_with.navbar:"undefined"!=typeof navbar?navbar:void 0,"Date"in locals_for_with?locals_for_with.Date:"undefined"!=typeof Date?Date:void 0,"url"in locals_for_with?locals_for_with.url:"undefined"!=typeof url?url:void 0),buf.join("")};return function(locals){if(locals&&locals._t)_t=locals._t.merge(_t);return yudify(locals)}};if("function"==typeof define&&define.amd)define(["js/lib/jade","i18n!pages/spark/views/template/nls/sidebar"],function(jade,_t){return jadify(jade,_t)});else wndw.jade.templates["pages.spark.views.template.sidebar"]=jadify(wndw.jade.helpers)}(window); -------------------------------------------------------------------------------- /Programming Assignment 2 - Lexical Scoping/Here's how makeVector and cachemean work_files/sidebar.js: -------------------------------------------------------------------------------- 1 | define(["jquery","underscore","backbone","pages/spark/app","i18n!pages/spark/views/template/nls/sidebar","pages/spark/views/template/sidebar.html","spark/app/signature/js/signature_track"],function($,_,Backbone,Coursera,_t,template,SigtrackFunctions){var sidebar=Backbone.View.extend({name:"sidebar",className:"coursera-sidebar",attributes:{role:"menubar"},initialize:function(){},render:function(){return this.$el.html(template({_t:_t,course:Coursera.course,user:Coursera.user,navbar:Coursera.navbar,config:Coursera.config,url:encodeURIComponent(decodeURIComponent(window.location.href))})),this.updateSidebar(),SigtrackFunctions.addLastChanceModalInteraction(this.$el),this},updateSidebar:function(){function markLink(query){if(foundActiveLink)return;var matches=[];if($navbar.find(query).each(function(){matches.push($(this).parent()),foundActiveLink=!0}),1==matches.length)if(foundActiveLink=!0,-1==window.location.href.indexOf("/search?q"))matches[0].addClass("active"),matches[0].find("a").append('(selected)')}this.$el.find(".course-navbar-container li").removeClass("active"),this.$el.find(".course-navbar-container li").remove(".course-navbar-selected-marker");var $navbar=this.$el.find(".course-navbar-container li"),foundActiveLink=!1;markLink('a[href="'+window.location.pathname+"/index"+window.location.search+'"]'),markLink('a[href="'+window.location.pathname+window.location.search+'"]'),markLink('a[href="'+window.location.href+'"]'),markLink('a[href="'+window.location.pathname+'"]'),markLink('a[href="'+window.location.href+'/index"]'),markLink('a[href="'+window.location.pathname+'/index"]'),markLink('a[href^="'+window.location.href.split("?")[0]+'"]')}});return sidebar}); -------------------------------------------------------------------------------- /Programming Assignment 2 - Lexical Scoping/Here's how makeVector and cachemean work_files/signatureTrackLastChanceModal.html.js: -------------------------------------------------------------------------------- 1 | !function(wndw){var jadify=function(jade,_t){_t="undefined"!=typeof _t?_t:function(key,interpolationHash){if("object"==typeof interpolationHash)return key.replace(/[#!]\{([^}]+?)\}/g,function(match,interpKey){return interpolationHash[interpKey]||interpKey});else return key};var yudify=function template(locals){var buf=[],jade_mixins={},jade_interp,locals_for_with=locals||{};return function(ribbon,specialization,certBaseImage,universityLogo,course,timeLeft){if(buf.push('")}("ribbon"in locals_for_with?locals_for_with.ribbon:"undefined"!=typeof ribbon?ribbon:void 0,"specialization"in locals_for_with?locals_for_with.specialization:"undefined"!=typeof specialization?specialization:void 0,"certBaseImage"in locals_for_with?locals_for_with.certBaseImage:"undefined"!=typeof certBaseImage?certBaseImage:void 0,"universityLogo"in locals_for_with?locals_for_with.universityLogo:"undefined"!=typeof universityLogo?universityLogo:void 0,"course"in locals_for_with?locals_for_with.course:"undefined"!=typeof course?course:void 0,"timeLeft"in locals_for_with?locals_for_with.timeLeft:"undefined"!=typeof timeLeft?timeLeft:void 0),buf.join("")};return function(locals){if(locals&&locals._t)_t=locals._t.merge(_t);return yudify(locals)}};if("function"==typeof define&&define.amd)define(["js/lib/jade"],function(jade,_t){return jadify(jade,_t)});else wndw.jade.templates["spark.app.signature.js.signatureTrackLastChanceModal"]=jadify(wndw.jade.helpers)}(window); -------------------------------------------------------------------------------- /Programming Assignment 2 - Lexical Scoping/Here's how makeVector and cachemean work_files/signature_track.js: -------------------------------------------------------------------------------- 1 | define(["jquery","pages/spark/app","js/lib/cookie","js/lib/modals","spark/app/signature/js/signatureTrackLastChanceModal.html","spark/app/signature/js/flexjoinLastChanceModal.html","js/lib/coursera.ab","js/lib/util"],function($,Coursera,Cookie,Modal,signatureTrackLastChanceModal,flexjoinLastChanceModal,AB,util){var functionList={addLastChanceModalInteraction:function($el){if(!Coursera.user.get("last_access_time"))return;var signup_url=Coursera.course.get("host")+"signature/course/"+Coursera.course.get("shortname")+"/"+Coursera.course.get("id"),specialization=Coursera.course.get("specialization");if(specialization)signup_url=Coursera.course.get("host")+"specialization/"+specialization.short_name+"/"+specialization.id;var sigtrackStatus=Coursera.course.get("signatureTrackStatus");if(1!==sigtrackStatus.signature_track_enabled)return;if(1===sigtrackStatus.signature_track_sign_up_now&&!Coursera.user.inSignatureTrack()&&!Coursera.user.isStaffOrSuperuser()){if(1!=Cookie.get("spark_signaturetrack_hide")){var join_label=null,join_st_button=null;if(!specialization){var join_label_id=AB.session.getExperiment("sigtrack_demonstrated_uses2").getChosenVariant();join_label={base:"Earn a Verified Certificate!","show-qualifications":"Show Your New Qualifications with a Verified Certificate","further-qualifications":"Deepen Your Qualifications with a Verified Certificate","list-resume":"Upgrade Your Resume with a Verified Certificate","list-cv":"Upgrade Your C.V. with a Verified Certificate","add-linkedin":"Add Verified Certificates to Your LinkedIn Profile","official-rec":"Earn Official Recognition from Top Universities","rec-achievement":"Get Recognition for Your Achievement with a Verified Certificate","link-identity":"Link Your Coursework to Your Identity","commitment-complete":"Motivate Yourself to Complete with a Verified Certificate","share-certificate":"Share Your Achievement With a Unique Certificate URL","share-records":"Show Your Success with Shareable Course Records","advance-career":"Advance Your Career with Verified Certificates","present-employer":"Gain Workplace Recognition, Earn Your Verified Certificate"}[join_label_id],join_st_button="Get Started"}else if(specialization)join_label='The "'+Coursera.course.get("specialization").name+'" Specialization',join_st_button="Learn More";$("body").prepend("
× "+join_label+" "+join_st_button+"
"),$(".course-signaturetrack-topbanner-close").click(function(){$(".course-signaturetrack-topbanner").hide(),Cookie.set("spark_signaturetrack_hide",1,{expires:new Date("2020"),path:"/"+Coursera.course.get("sessionName")})})}var makeLastChanceModal=function(arg){return $(signatureTrackLastChanceModal({ribbon:arg.ribbon,universityLogo:arg.universityLogo,certBaseImage:arg.certBaseImage,studentName:arg.studentName,course:arg.course,specialization:arg.course.get("specialization"),timeLeft:arg.timeLeft}))},makeFlexjoinModal=function(arg){return $(flexjoinLastChanceModal({ribbon:arg.ribbon,universityLogo:arg.universityLogo,certBaseImage:arg.certBaseImage,studentName:arg.studentName,course:arg.course,specialization:arg.course.get("specialization"),timeLeft:arg.timeLeft,closeDate:arg.closeDate}))};if((sigtrackStatus.signature_track_last_chance_dialog||sigtrackStatus.flexjoin_last_chance_dialog)&&!Coursera.user.get("last_chance_modal")&&!util.isMobileDevice()){var $modalDiv;if(sigtrackStatus.flexjoin_last_chance_dialog)$modalDiv=makeFlexjoinModal({ribbon:Coursera.course.get("assetUnversionedLink")+"/pages/signature/views/ribbon_stripes.png",timeLeft:sigtrackStatus.signature_track_duration_left,course:Coursera.course,studentName:Coursera.user.get("full_name"),certBaseImage:Coursera.course.get("assetUnversionedLink")+"/images/signature/template-cert-preview.png",universityLogo:Coursera.course.get("host")+"/maestro/api/course/"+Coursera.course.get("id")+"/university_logo",closeDate:sigtrackStatus.flexjoin_registration_close_date});else $modalDiv=makeLastChanceModal({ribbon:Coursera.course.get("assetUnversionedLink")+"/pages/signature/views/ribbon_stripes.png",timeLeft:sigtrackStatus.signature_track_duration_left,course:Coursera.course,studentName:Coursera.user.get("full_name"),certBaseImage:Coursera.course.get("assetUnversionedLink")+"/images/signature/template-cert-preview.png",universityLogo:Coursera.course.get("host")+"/maestro/api/course/"+Coursera.course.get("id")+"/university_logo"});var modal=new Modal($modalDiv,{"overlay.class":"coursera-signature-modal-overlay-darker","overlay.close":!1});modal.on("open",function(){if($(".course-signaturetrack-modal-learnmore").on("click",function(){window.open(signup_url+"?utm_source=spark&utm_medium=lastchance")}),Coursera.course.get("specialization"))$(".course-specialization-modal-learnmore").on("click",function(){window.open(signup_url+"?utm_source=spark&utm_medium=lastchance")})}),modal.on("close",function(){Coursera.api.get("signature/user/set_last_chance")}),modal.open()}}}};return functionList}); -------------------------------------------------------------------------------- /Programming Assignment 2 - Lexical Scoping/Here's how makeVector and cachemean work_files/spark.forum.hg.css: -------------------------------------------------------------------------------- 1 | /* bootstrap variables ------------------------------------------------------ */ 2 | /* human-grading variables -------------------------------------------------- */ 3 | /* bootstrap mixins --------------------------------------------------------- */ 4 | .clearfix { 5 | *zoom: 1; 6 | } 7 | .clearfix:before, 8 | .clearfix:after { 9 | display: table; 10 | content: ""; 11 | } 12 | .clearfix:after { 13 | clear: both; 14 | } 15 | .hide-text { 16 | overflow: hidden; 17 | text-indent: 100%; 18 | white-space: nowrap; 19 | } 20 | .input-block-level { 21 | display: block; 22 | width: 100%; 23 | min-height: 28px; 24 | /* Make inputs at least the height of their button counterpart */ 25 | 26 | /* Makes inputs behave like true block-level elements */ 27 | 28 | -webkit-box-sizing: border-box; 29 | -moz-box-sizing: border-box; 30 | -ms-box-sizing: border-box; 31 | box-sizing: border-box; 32 | } 33 | /* human-grading mixins ----------------------------------------------------- */ 34 | /* human-grading form group ------------------------------------------------- */ 35 | .hg-qna > .assessmentExposition, 36 | .hg-qna > .assessmentAnswer, 37 | .hg-qna > .assessmentEvaluation { 38 | min-height: 20px; 39 | padding: 19px 19px 0 19px; 40 | margin-bottom: 20px; 41 | background-color: white; 42 | -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); 43 | -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); 44 | box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); 45 | border: 1px solid #ccc; 46 | border: 1px solid rgba(0, 0, 0, 0.1); 47 | } 48 | .hg-qna > .assessmentExposition { 49 | background-color: #efefef; 50 | padding-bottom: 19px; 51 | } 52 | .hg-qna > .assessmentExposition + .assessmentAnswer, 53 | .hg-qna > .assessmentExposition + .assessmentEvaluation { 54 | /* Negate the assessmentExposition box's margin-bottom */ 55 | 56 | margin-top: -20px; 57 | } 58 | .hg-qna > .assessmentAnswer > *, 59 | .hg-qna > .assessmentEvaluation > * { 60 | margin-bottom: 18px; 61 | } 62 | -------------------------------------------------------------------------------- /Programming Assignment 2 - Lexical Scoping/Here's how makeVector and cachemean work_files/student-page.html.js: -------------------------------------------------------------------------------- 1 | !function(wndw){var jadify=function(jade,_t){_t="undefined"!=typeof _t?_t:function(key,interpolationHash){if("object"==typeof interpolationHash)return key.replace(/[#!]\{([^}]+?)\}/g,function(match,interpKey){return interpolationHash[interpKey]||interpKey});else return key};var yudify=function template(locals){var buf=[],jade_mixins={},jade_interp;return buf.push('
'),buf.join("")};return function(locals){if(locals&&locals._t)_t=locals._t.merge(_t);return yudify(locals)}};if("function"==typeof define&&define.amd)define(["js/lib/jade"],function(jade,_t){return jadify(jade,_t)});else wndw.jade.templates["pages.spark.views.template.student-page"]=jadify(wndw.jade.helpers)}(window); -------------------------------------------------------------------------------- /Programming Assignment 2 - Lexical Scoping/Here's how makeVector and cachemean work_files/student-page.js: -------------------------------------------------------------------------------- 1 | define(["jquery","backbone","underscore","pages/spark/views/template/student-page.html","js/lib/api","js/core/coursera","js/lib/cookie"],function($,Backbone,_,template,API,Coursera,cookie){var page=Backbone.View.extend({name:"page",subregions:{header:"pages/spark/views/template/header",sidebar:"pages/spark/views/template/sidebar"},initialize:function(){this.bind("view:appended",this.scroll),this.bind("view:updated",this.scroll)},scroll:function(){$("html, body").scrollTop(0),$(window).trigger("scroll")},renderPrioritySupportButton:function(){function showSupportButton(network_name){$("[data-networkprioritysupportwidget]").text(network_name+" Priority Support"),$("[data-networkprioritysupportwidget]").show()}var cookieName="network-priority-support",cookieValue=cookie.get(cookieName);if(cookieValue){try{cookieValue=JSON.parse(cookieValue)}catch(e){return Coursera.multitracker.push(["CPP Priority Cookie Value",cookieValue]),void cookie.clear(cookieName)}if(cookieValue.network_name)showSupportButton(cookieValue.network_name);return}if(Math.random()>.25)return;var path="signature/user/get_premium_support_network",postData={data:{"user-id":Coursera.user.get("id"),"session-id":Coursera.course.get("id")},success:function(d){if(null!==d&&d.network_name)cookie.set(cookieName,JSON.stringify({network_name:d.network_name}),{expires:7,path:"/"+Coursera.course.get("sessionName")}),showSupportButton(d.network_name);else if(null!==d&&d.error)cookie.set(cookieName,JSON.stringify({error:d.error}),{expires:7,path:"/"+Coursera.course.get("sessionName")})},error:function(){}};Coursera.api.get(path,postData)},render:function(){var regions=this.region.regions,self=this,page=$(template());return self.$el.append(page),_.each(["header","sidebar","body"],function(type){if(!regions[type]){if("body"!=type)page.find(".coursera-"+type).hide();else page.find(".coursera-body").replaceWith($("#spark").show());return}page.find(".coursera-"+type).replaceWith(regions[type].view.el)}),this.renderPrioritySupportButton(),self}});return page}); -------------------------------------------------------------------------------- /Programming Assignment 2 - Lexical Scoping/Here's how makeVector and cachemean work_files/university_logo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muntasir2165/R-Programming-Assignments-1--2--and-3-/3dd6003062ddf6851a2baa06b04ed96e9eabfb60/Programming Assignment 2 - Lexical Scoping/Here's how makeVector and cachemean work_files/university_logo -------------------------------------------------------------------------------- /Programming Assignment 2 - Lexical Scoping/cachematrix.R: -------------------------------------------------------------------------------- 1 | ## The following functions calculate the inverse of a matrix and saves it 2 | ## to the cache such that the next time the user attempts to calculate the 3 | ## matrix inverse, the previously saved value is returned instead of 4 | ## repeating the calculation. 5 | 6 | ## This function creates a special "matrix" object, which is really a list 7 | ## containing a function to 8 | ## 1. set the value of the matrix 9 | ## 2. get the value of the matrix 10 | ## 3. set the value of the inverse 11 | ## 4. get the value of the inverse 12 | 13 | makeCacheMatrix <- function(x = matrix()) { 14 | ## create a matrix object x and some associated sub-functions/methods 15 | 16 | ## define the cache m 17 | m <- NULL 18 | set <- function(y) { 19 | x <<- y ## assign the input matrix y to the variable x in the 20 | ## parent environment 21 | m <<- NULL ## re-initialize m in the parent environment to null 22 | } 23 | get <- function() x ## return the matrix x 24 | setinverse <- function(inverse) m <<- inverse ## set the cache m equal 25 | ## to the inverse of the matrix x 26 | getinverse <- function() m ## return the cached inverse of x 27 | list(set = set, get = get, 28 | setinverse = setinverse, 29 | getinverse = getinverse) 30 | } 31 | 32 | 33 | ## The following function calculates the inverse of the special "matrix" created 34 | ## with the above function. However, it first checks to see if the inverse 35 | ## has already been caclulated. If so, it 'get's the inverse from the cache 36 | ## and skips the computation. Otherwise, it calculates the matrix inverse 37 | ## and sets the value of the inverse in the cache via the 'setinverse' function. 38 | 39 | cacheSolve <- function(x, ...) { 40 | ## Return a matrix that is the inverse of 'x' 41 | 42 | m <- x$getinverse() 43 | if(!is.null(m)) { 44 | message("getting cached data") 45 | return(m) 46 | } 47 | data <- x$get() 48 | m <- solve(data, ...) 49 | x$setinverse(m) 50 | m 51 | } 52 | -------------------------------------------------------------------------------- /Programming Assignment 3 - Hospital Quality/best.R: -------------------------------------------------------------------------------- 1 | best <- function(state, outcome) { 2 | ## Read outcome data 3 | ##outcome_name: "heart attack", "heart failure", "pneumonia" 4 | 5 | ## Check that state and outcome are valid 6 | ## Return hospital name in that state with lowest 30-day death 7 | ## rate 8 | #read in the desired data 9 | data <- read.csv("outcome-of-care-measures.csv", colClasses = "character") 10 | 11 | #check if the state and outcomes are valid 12 | states <- data[ , 7] 13 | outcomes <- c("heart attack", "heart failure", "pneumonia") 14 | if ((state %in% states) == FALSE) { 15 | stop(print("invalid state")) 16 | } 17 | else if ((outcome %in% outcomes) == FALSE) { 18 | stop(print("invalid outcome")) 19 | } 20 | 21 | #get the subset of the data with the desired state 22 | new_data <- subset(data, State == state) 23 | 24 | #get the desired outcome column from the data file 25 | if (outcome == "heart attack") { 26 | outcome_column <- 11 27 | } 28 | else if (outcome == "heart failure") { 29 | outcome_column <- 17 30 | } 31 | else { 32 | outcome_column <- 23 33 | } 34 | 35 | #get rid of the NA's in the desired outcome column 36 | required_columns <- as.numeric(new_data[,outcome_column]) 37 | bad <- is.na(required_columns) 38 | desired_data <- new_data[!bad, ] 39 | 40 | #find the hospitals in the rows with the minimum outcome value 41 | columns_considered <- as.numeric(desired_data[, outcome_column]) 42 | desired_rows <- which(columns_considered == min(columns_considered)) 43 | desired_hospitals <- desired_data[desired_rows, 2] 44 | 45 | #if there are multiple hospitals with the minimum outcome value, then 46 | #return the first hospital name from the alphabetically sorted hospital 47 | #names list 48 | if (length(desired_hospitals) > 1) { 49 | hospitals_sorted <- sort(desired_hospitals) 50 | hospitals_sorted[1] 51 | } 52 | else { 53 | desired_hospitals 54 | } 55 | } -------------------------------------------------------------------------------- /Programming Assignment 3 - Hospital Quality/rankall.R: -------------------------------------------------------------------------------- 1 | rankall <- function(outcome, num = "best") { 2 | ## Read outcome data 3 | 4 | ## Check that state and outcome are valid 5 | ## For each state, find the hospital of the given rank 6 | ## Return a data frame with the hospital names and the 7 | ## (abbreviated) state name 8 | 9 | #read in the desired data 10 | data <- read.csv("outcome-of-care-measures.csv", colClasses = "character") 11 | 12 | #create a list of states and initialize a character array to hold the 13 | #required hospital names 14 | state <- levels(factor(data[, 7])) 15 | hospital <- vector(mode="character") 16 | 17 | for (i in seq(state)) { 18 | hospital[i] <- rankhospital(state[i], outcome, num) 19 | } 20 | data.frame(hospital, state) 21 | } 22 | -------------------------------------------------------------------------------- /Programming Assignment 3 - Hospital Quality/rankhospital.R: -------------------------------------------------------------------------------- 1 | rankhospital <- function(state, outcome, num = "best") { 2 | ## Read outcome data 3 | 4 | ## Check that state and outcome are valid 5 | ## Return hospital name in that state with the given rank 6 | ## 30-day death rate 7 | 8 | #read in the desired data 9 | data <- read.csv("outcome-of-care-measures.csv", colClasses = "character") 10 | 11 | #check if the state and outcomes are valid 12 | states <- data[ , 7] 13 | outcomes <- c("heart attack", "heart failure", "pneumonia") 14 | if ((state %in% states) == FALSE) { 15 | stop(print("invalid state")) 16 | } 17 | else if ((outcome %in% outcomes) == FALSE) { 18 | stop(print("invalid outcome")) 19 | } 20 | 21 | #get the subset of the data with the desired state 22 | new_data <- subset(data, State == state) 23 | 24 | #get the desired outcome column from the data file 25 | if (outcome == "heart attack") { 26 | outcome_column <- 11 27 | } 28 | else if (outcome == "heart failure") { 29 | outcome_column <- 17 30 | } 31 | else { 32 | outcome_column <- 23 33 | } 34 | 35 | #if num is greater that the number of hospitals in the desired state, 36 | # return NA 37 | if (is.numeric(num) == TRUE) { 38 | if (length(data[,2]) < num) { 39 | return(NA) 40 | } 41 | } 42 | 43 | #get rid of the NA's in the desired outcome column 44 | new_data[, outcome_column] <- as.numeric(new_data[,outcome_column]) 45 | bad <- is.na(new_data[, outcome_column]) 46 | desired_data <- new_data[!bad, ] 47 | 48 | #arrange the modified dataframe in ascending order of the outcome values 49 | outcome_column_name <- names(desired_data)[outcome_column] 50 | hospital_column_name <- names(desired_data)[2] 51 | index <- with(desired_data, order(desired_data[outcome_column_name], desired_data[hospital_column_name])) 52 | ordered_desired_data <- desired_data[index, ] 53 | 54 | #if nume is either "best" or "worst", then interpret it to the 55 | #corresponding numerical value 56 | if (is.character(num) == TRUE) { 57 | if (num == "best") { 58 | num = 1 59 | } 60 | else if (num == "worst") { 61 | num = length(ordered_desired_data[, outcome_column]) 62 | } 63 | } 64 | #return the hospital name with the outcome ranking of num 65 | ordered_desired_data[num, 2] 66 | } 67 | -------------------------------------------------------------------------------- /Programming Assignment 3 - Hospital Quality/rprog-data-ProgAssignment3-data.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muntasir2165/R-Programming-Assignments-1--2--and-3-/3dd6003062ddf6851a2baa06b04ed96e9eabfb60/Programming Assignment 3 - Hospital Quality/rprog-data-ProgAssignment3-data.zip -------------------------------------------------------------------------------- /Programming Assignment 3 - Hospital Quality/rprog-data-ProgAssignment3-data/Hospital_Revised_Flatfiles.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muntasir2165/R-Programming-Assignments-1--2--and-3-/3dd6003062ddf6851a2baa06b04ed96e9eabfb60/Programming Assignment 3 - Hospital Quality/rprog-data-ProgAssignment3-data/Hospital_Revised_Flatfiles.pdf -------------------------------------------------------------------------------- /Programming Assignment 3 - Hospital Quality/rprog-data-ProgAssignment3-data/best.R: -------------------------------------------------------------------------------- 1 | best <- function(state, outcome) { 2 | ## Read outcome data 3 | ##outcome_name: "heart attack", "heart failure", "pneumonia" 4 | 5 | ## Check that state and outcome are valid 6 | ## Return hospital name in that state with lowest 30-day death 7 | ## rate 8 | #read in the desired data 9 | data <- read.csv("outcome-of-care-measures.csv", colClasses = "character") 10 | 11 | #check if the state and outcomes are valid 12 | states <- data[ , 7] 13 | outcomes <- c("heart attack", "heart failure", "pneumonia") 14 | if ((state %in% states) == FALSE) { 15 | stop(print("invalid state")) 16 | } 17 | else if ((outcome %in% outcomes) == FALSE) { 18 | stop(print("invalid outcome")) 19 | } 20 | 21 | #get the subset of the data with the desired state 22 | new_data <- subset(data, State == state) 23 | 24 | #get the desired outcome column from the data file 25 | if (outcome == "heart attack") { 26 | outcome_column <- 11 27 | } 28 | else if (outcome == "heart failure") { 29 | outcome_column <- 17 30 | } 31 | else { 32 | outcome_column <- 23 33 | } 34 | 35 | #get rid of the NA's in the desired outcome column 36 | required_columns <- as.numeric(new_data[,outcome_column]) 37 | bad <- is.na(required_columns) 38 | desired_data <- new_data[!bad, ] 39 | 40 | #find the hospitals in the rows with the minimum outcome value 41 | columns_considered <- as.numeric(desired_data[, outcome_column]) 42 | desired_rows <- which(columns_considered == min(columns_considered)) 43 | desired_hospitals <- desired_data[desired_rows, 2] 44 | 45 | #if there are multiple hospitals with the minimum outcome value, then 46 | #return the first hospital name from the alphabetically sorted hospital 47 | #names list 48 | if (length(desired_hospitals) > 1) { 49 | hospitals_sorted <- sort(desired_hospitals) 50 | hospitals_sorted[1] 51 | } 52 | else { 53 | desired_hospitals 54 | } 55 | } -------------------------------------------------------------------------------- /Programming Assignment 3 - Hospital Quality/rprog-data-ProgAssignment3-data/rankall.R: -------------------------------------------------------------------------------- 1 | rankall <- function(outcome, num = "best") { 2 | ## Read outcome data 3 | 4 | ## Check that state and outcome are valid 5 | ## For each state, find the hospital of the given rank 6 | ## Return a data frame with the hospital names and the 7 | ## (abbreviated) state name 8 | 9 | #read in the desired data 10 | data <- read.csv("outcome-of-care-measures.csv", colClasses = "character") 11 | 12 | #create a list of states and initialize a character array to hold the 13 | #required hospital names 14 | state <- levels(factor(data[, 7])) 15 | hospital <- vector(mode="character") 16 | 17 | for (i in seq(state)) { 18 | hospital[i] <- rankhospital(state[i], outcome, num) 19 | } 20 | data.frame(hospital, state) 21 | } 22 | -------------------------------------------------------------------------------- /Programming Assignment 3 - Hospital Quality/rprog-data-ProgAssignment3-data/rankhospital.R: -------------------------------------------------------------------------------- 1 | rankhospital <- function(state, outcome, num = "best") { 2 | ## Read outcome data 3 | 4 | ## Check that state and outcome are valid 5 | ## Return hospital name in that state with the given rank 6 | ## 30-day death rate 7 | 8 | #read in the desired data 9 | data <- read.csv("outcome-of-care-measures.csv", colClasses = "character") 10 | 11 | #check if the state and outcomes are valid 12 | states <- data[ , 7] 13 | outcomes <- c("heart attack", "heart failure", "pneumonia") 14 | if ((state %in% states) == FALSE) { 15 | stop(print("invalid state")) 16 | } 17 | else if ((outcome %in% outcomes) == FALSE) { 18 | stop(print("invalid outcome")) 19 | } 20 | 21 | #get the subset of the data with the desired state 22 | new_data <- subset(data, State == state) 23 | 24 | #get the desired outcome column from the data file 25 | if (outcome == "heart attack") { 26 | outcome_column <- 11 27 | } 28 | else if (outcome == "heart failure") { 29 | outcome_column <- 17 30 | } 31 | else { 32 | outcome_column <- 23 33 | } 34 | 35 | #if num is greater that the number of hospitals in the desired state, 36 | # return NA 37 | if (is.numeric(num) == TRUE) { 38 | if (length(data[,2]) < num) { 39 | return(NA) 40 | } 41 | } 42 | 43 | #get rid of the NA's in the desired outcome column 44 | new_data[, outcome_column] <- as.numeric(new_data[,outcome_column]) 45 | bad <- is.na(new_data[, outcome_column]) 46 | desired_data <- new_data[!bad, ] 47 | 48 | #arrange the modified dataframe in ascending order of the outcome values 49 | outcome_column_name <- names(desired_data)[outcome_column] 50 | hospital_column_name <- names(desired_data)[2] 51 | index <- with(desired_data, order(desired_data[outcome_column_name], desired_data[hospital_column_name])) 52 | ordered_desired_data <- desired_data[index, ] 53 | 54 | #if nume is either "best" or "worst", then interpret it to the 55 | #corresponding numerical value 56 | if (is.character(num) == TRUE) { 57 | if (num == "best") { 58 | num = 1 59 | } 60 | else if (num == "worst") { 61 | num = length(ordered_desired_data[, outcome_column]) 62 | } 63 | } 64 | #return the hospital name with the outcome ranking of num 65 | ordered_desired_data[num, 2] 66 | } 67 | -------------------------------------------------------------------------------- /Programming Assignment 3 - Hospital Quality/rprog-doc-ProgAssignment3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muntasir2165/R-Programming-Assignments-1--2--and-3-/3dd6003062ddf6851a2baa06b04ed96e9eabfb60/Programming Assignment 3 - Hospital Quality/rprog-doc-ProgAssignment3.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | R Programming Assignments - 1, 2and 3 2 | ====================================== 3 | 4 | Programming assignments for the course "R Programming" 5 | 6 | **Programming Assignment 1 - Air Pollution** 7 | For this first programming assignment you will write three functions that are meant to 8 | interact with dataset that accompanies this assignment. The dataset is contained in a zip 9 | file specdata.zip that you can download from the Coursera web site. 10 | 11 | **Programming Assignment 2 - Lexical Scoping** 12 | This second programming assignment will require you to write an R function is able to 13 | cache potentially time-consuming computations. For example, taking the mean of a numeric 14 | vector is typically a fast operation. However, for a very long vector, it may take too 15 | long to compute the mean, especially if it has to be computed repeatedly (e.g. in a loop). 16 | If the contents of a vector are not changing, it may make sense to cache the value of the 17 | mean so that when we need it again, it can be looked up in the cache rather than 18 | recomputed. In this Programming Assignment will take advantage of the scoping rules of 19 | the R language and how they can be manipulated to preserve state inside of an R object. 20 | 21 | **Programming Assignment 3 - Hospital Quality** 22 | See the file "rprog-doc-ProgAssignment3.pdf" inside the Assignment 3 directory for more 23 | information about this assignment. -------------------------------------------------------------------------------- /swirl Programming Assignment/Assignment Details Coursera_files/204.min.js: -------------------------------------------------------------------------------- 1 | !function(e){var t=/.*\/204\.(min\.)?js(\?.*)?$/,n=4e3,o=function(t){var n=[];for(var o in t)n.push("string"!=typeof t[o]&&e.JSON?o+"="+encodeURIComponent(e.JSON.stringify(t[o])):o+"="+encodeURIComponent(t[o].toString()));return e.JSON||n.push("_noJSON_=true"),n.join("&")},i=function(t,n,o){var i=document.createElement("iframe"),r=(new Date).getTime().toString();document.body.appendChild(i),i.style.display="none",i.name=r,i.contentWindow.name=r;var s=document.createElement("div");s.style.display="none";var a=document.createElement("form");a.target=r,a.action=t,a.method="POST",s.appendChild(a);var c;for(var p in n)c=document.createElement("input"),c.type="hidden",c.name=p,c.value="string"!=typeof n[p]&&e.JSON?e.JSON.stringify(n[p]):n[p].toString(),a.appendChild(c);document.body.appendChild(s),i.onload=i.onreadystatechange=function(){this.readyState&&"complete"!=this.readyState||(i.onreadystatechange=i.onload=null,i.parentNode.removeChild(i),a.parentNode.removeChild(a),o&&"function"==typeof o&&o())},a.submit()},r=function(e,t,n,o){var r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src=e+"?"+n,r.onload=r.onreadystatechange=function(){this.readyState&&"complete"!=this.readyState||(r.onreadystatechange=r.onload=null,r.parentNode.removeChild(r),o&&"function"==typeof o&&o())},r.onerror=function(){i(e,t,o)},document.getElementsByTagName("head")[0].appendChild(r)},s=function(e,t,s){var a=o(t);a.length=0;n--)c.remove(e[n],t)},h=function(e){e.options.session=e.session();var t=e.options.initialReferrerTracker,n={domain:e.options.domain,days:365};e.options.initialReferrer=c.setOnce(t,e.options.from,n)},u=function(){for(var n=e.document.scripts||document.getElementsByTagName("script"),o=n.length,i=e.document.referrer,r=e.location.host.split(".");r.length>2;)r.shift();this.options={user:null,version:null,session:null,client:"204",from:i,domain:"."+r.join("."),currentURL:e.location.href,tracker:"__204u",initialReferrerTracker:"__204r",beacon:"https://eventing.coursera.org/info"};for(var s=0;o>s;s++)if(t.test(n[s].src)){var a=/^.+\?(.*)$/.exec(n[s].src);if(a)for(var c=a[1].split("&"),p=0;p")}("ribbon"in locals_for_with?locals_for_with.ribbon:"undefined"!=typeof ribbon?ribbon:void 0,"certBaseImage"in locals_for_with?locals_for_with.certBaseImage:"undefined"!=typeof certBaseImage?certBaseImage:void 0,"universityLogo"in locals_for_with?locals_for_with.universityLogo:"undefined"!=typeof universityLogo?universityLogo:void 0,"course"in locals_for_with?locals_for_with.course:"undefined"!=typeof course?course:void 0,"closeDate"in locals_for_with?locals_for_with.closeDate:"undefined"!=typeof closeDate?closeDate:void 0,"timeLeft"in locals_for_with?locals_for_with.timeLeft:"undefined"!=typeof timeLeft?timeLeft:void 0),buf.join("")};return function(locals){if(locals&&locals._t)_t=locals._t.merge(_t);return yudify(locals)}};if("function"==typeof define&&define.amd)define(["js/lib/jade"],function(jade,_t){return jadify(jade,_t)});else wndw.jade.templates["spark.app.signature.js.flexjoinLastChanceModal"]=jadify(wndw.jade.helpers)}(window); -------------------------------------------------------------------------------- /swirl Programming Assignment/Assignment Details Coursera_files/header(1).js: -------------------------------------------------------------------------------- 1 | define({es:!0,fr:!0,pt:!0,ru:!0,tr:!0,zh:!0,"zh-hk":"zh-tw","zh-mo":"zh-tw","zh-tw":!0}); -------------------------------------------------------------------------------- /swirl Programming Assignment/Assignment Details Coursera_files/header.js: -------------------------------------------------------------------------------- 1 | define(["underscore","backbone","js/lib/readme","pages/spark/app","i18n!pages/spark/views/template/nls/header","pages/spark/views/template/header.html"],function(_,Backbone,Readme,Coursera,_t,template){"use strict";var header=Backbone.View.extend({name:"header",className:"coursera-header",attributes:{role:"menubar"},initialize:function(){this.on("view:appended",function(){try{var dashboardLink="data/dashboard",onDashboardAlready=-1!==window.location.pathname.indexOf(dashboardLink,window.location.pathname.length-dashboardLink.length);if(!onDashboardAlready){for(var readmeLinks=$("[data-readme=data-dashboard-announcement] a"),i=0;i=max)return this.emitter.trigger("aged"),!1;if(_private.open)return _private.stack.push(this),!1;else return _private.open=!0,!0}},ReadMe=function(el,options){var that=this;this.$el=$(el),this.emitter=LucidJS.emitter(this),this.customize(options),window.setTimeout(function(){that.open()},this.options["show.delay"]||0)};ReadMe.prototype.customize=function(settings){var that=this,height;if(this.options=_.extend({},DataAttributes.parse(this.$el,_private.defaults,"data-readme-"),settings),this.$el.addClass(this.options["class"]),"banner"==this.options.type)this.$el.css({visibility:"hidden"}).show(),height=this.$el.outerHeight(),this.$el.css({visibility:"visible"}).hide(),this.options["animate.open"]={"margin-top":0},this.options["animate.close"]={"margin-top":-height},this.options["animate.duration"]=250,this.on("opening",function(){that.$el.css({visibility:"visible","margin-top":-height}).show().prependTo($("body"))});else if("footer-sticky"==this.options.type)this.$el.css({visibility:"hidden"}).show(),height=this.$el.outerHeight(),this.$el.css({visibility:"visible"}).hide(),this.options["animate.open"]={bottom:0},this.options["animate.close"]={bottom:-height},this.options["animate.duration"]=250,this.on("opening",function(){that.$el.css({visibility:"visible",position:"absolute",left:0,right:0,bottom:-height}).show().appendTo($("body"))});return this},ReadMe.prototype.open=function(){var that=this;if(_private.canShow.call(this)){if(!this.options["show.until.closed"]&&this.options["show.count"])_private.increaseCount.call(this);if(this.emitter.trigger("opening"),_private.stack.push(this),this.$el.on(this.options["bind.close"]+".readme","["+this.options["attribute.close"]+"]",function(){if(that.options["show.until.closed"]&&that.options["show.count"])_private.increaseCount.call(that);that.close()}),this.$el.is("["+this.options["attribute.close"]+"]"))this.$el.on(this.options["bind.close"]+".readme",function(){if(that.options["show.until.closed"]&&that.options["show.count"])_private.increaseCount.call(that);that.close()});if(this.options["animate.open"])this.$el.css({"margin-top":-100}).prependTo($("body")).show(),this.$el.animate(this.options["animate.open"],{duration:this.options["animate.duration"],complete:function(){that.emitter.trigger("open")}});else this.$el.show(),this.emitter.trigger("open")}},ReadMe.prototype.close=function(){var that=this;if(this.trigger("closing"),_private.stack.shift(),this.options["animate.close"])this.$el.animate(this.options["animate.close"],{duration:this.options["animate.duration"],complete:function(){if(that.$el.off(".readme"),that.$el.hide().remove(),that.emitter.trigger("close"),_private.open=!1,_private.stack.length)_private.stack[0].open()}});else if(this.$el.off(".readme"),this.$el.hide().remove(),this.emitter.trigger("close"),_private.open=!1,_private.stack.length)_private.stack[0].open()};var external=function(el,options){return _private.getReadMe(el,options)||_private.makeReadMe(el,options)};return external};if("function"==typeof define&&define.amd)define(["jquery","underscore","js/lib/cookie","js/lib/lucid","js/lib/moment","js/lib/data.attributes"],function($,_,cookie,LucidJS,Moment,DataAttributes){return Module($,_,cookie,LucidJS,Moment,DataAttributes)});else if("undefined"!=typeof window&&"undefined"==typeof ender)wndw.ReadMe=Module(wndw.$,wndw._,wndw.Cookie,wndw.LucidJS,wndw.moment,wndw.DataAttributes)}(window); -------------------------------------------------------------------------------- /swirl Programming Assignment/Assignment Details Coursera_files/sidebar(1).js: -------------------------------------------------------------------------------- 1 | define({es:!0,fr:!0,pt:!0,ru:!0,tr:!0,zh:!0,"zh-hk":"zh-tw","zh-mo":"zh-tw","zh-tw":!0}); -------------------------------------------------------------------------------- /swirl Programming Assignment/Assignment Details Coursera_files/sidebar.html.js: -------------------------------------------------------------------------------- 1 | !function(wndw){var jadify=function(jade,_t){var yudify=function template(locals){var buf=[],jade_mixins={},jade_interp,locals_for_with=locals||{};return function(course,user,config,_t,navbar,Date,url){if(buf.push('")}("course"in locals_for_with?locals_for_with.course:"undefined"!=typeof course?course:void 0,"user"in locals_for_with?locals_for_with.user:"undefined"!=typeof user?user:void 0,"config"in locals_for_with?locals_for_with.config:"undefined"!=typeof config?config:void 0,"_t"in locals_for_with?locals_for_with._t:"undefined"!=typeof _t?_t:void 0,"navbar"in locals_for_with?locals_for_with.navbar:"undefined"!=typeof navbar?navbar:void 0,"Date"in locals_for_with?locals_for_with.Date:"undefined"!=typeof Date?Date:void 0,"url"in locals_for_with?locals_for_with.url:"undefined"!=typeof url?url:void 0),buf.join("")};return function(locals){if(locals&&locals._t)_t=locals._t.merge(_t);return yudify(locals)}};if("function"==typeof define&&define.amd)define(["js/lib/jade","i18n!pages/spark/views/template/nls/sidebar"],function(jade,_t){return jadify(jade,_t)});else wndw.jade.templates["pages.spark.views.template.sidebar"]=jadify(wndw.jade.helpers)}(window); -------------------------------------------------------------------------------- /swirl Programming Assignment/Assignment Details Coursera_files/sidebar.js: -------------------------------------------------------------------------------- 1 | define(["jquery","underscore","backbone","pages/spark/app","i18n!pages/spark/views/template/nls/sidebar","pages/spark/views/template/sidebar.html","spark/app/signature/js/signature_track"],function($,_,Backbone,Coursera,_t,template,SigtrackFunctions){var sidebar=Backbone.View.extend({name:"sidebar",className:"coursera-sidebar",attributes:{role:"menubar"},initialize:function(){},render:function(){return this.$el.html(template({_t:_t,course:Coursera.course,user:Coursera.user,navbar:Coursera.navbar,config:Coursera.config,url:encodeURIComponent(decodeURIComponent(window.location.href))})),this.updateSidebar(),SigtrackFunctions.addLastChanceModalInteraction(this.$el),this},updateSidebar:function(){function markLink(query){if(foundActiveLink)return;var matches=[];if($navbar.find(query).each(function(){matches.push($(this).parent()),foundActiveLink=!0}),1==matches.length)if(foundActiveLink=!0,-1==window.location.href.indexOf("/search?q"))matches[0].addClass("active"),matches[0].find("a").append('(selected)')}this.$el.find(".course-navbar-container li").removeClass("active"),this.$el.find(".course-navbar-container li").remove(".course-navbar-selected-marker");var $navbar=this.$el.find(".course-navbar-container li"),foundActiveLink=!1;markLink('a[href="'+window.location.pathname+"/index"+window.location.search+'"]'),markLink('a[href="'+window.location.pathname+window.location.search+'"]'),markLink('a[href="'+window.location.href+'"]'),markLink('a[href="'+window.location.pathname+'"]'),markLink('a[href="'+window.location.href+'/index"]'),markLink('a[href="'+window.location.pathname+'/index"]'),markLink('a[href^="'+window.location.href.split("?")[0]+'"]')}});return sidebar}); -------------------------------------------------------------------------------- /swirl Programming Assignment/Assignment Details Coursera_files/signatureTrackLastChanceModal.html.js: -------------------------------------------------------------------------------- 1 | !function(wndw){var jadify=function(jade,_t){_t="undefined"!=typeof _t?_t:function(key,interpolationHash){if("object"==typeof interpolationHash)return key.replace(/[#!]\{([^}]+?)\}/g,function(match,interpKey){return interpolationHash[interpKey]||interpKey});else return key};var yudify=function template(locals){var buf=[],jade_mixins={},jade_interp,locals_for_with=locals||{};return function(ribbon,specialization,certBaseImage,universityLogo,course,timeLeft){if(buf.push('")}("ribbon"in locals_for_with?locals_for_with.ribbon:"undefined"!=typeof ribbon?ribbon:void 0,"specialization"in locals_for_with?locals_for_with.specialization:"undefined"!=typeof specialization?specialization:void 0,"certBaseImage"in locals_for_with?locals_for_with.certBaseImage:"undefined"!=typeof certBaseImage?certBaseImage:void 0,"universityLogo"in locals_for_with?locals_for_with.universityLogo:"undefined"!=typeof universityLogo?universityLogo:void 0,"course"in locals_for_with?locals_for_with.course:"undefined"!=typeof course?course:void 0,"timeLeft"in locals_for_with?locals_for_with.timeLeft:"undefined"!=typeof timeLeft?timeLeft:void 0),buf.join("")};return function(locals){if(locals&&locals._t)_t=locals._t.merge(_t);return yudify(locals)}};if("function"==typeof define&&define.amd)define(["js/lib/jade"],function(jade,_t){return jadify(jade,_t)});else wndw.jade.templates["spark.app.signature.js.signatureTrackLastChanceModal"]=jadify(wndw.jade.helpers)}(window); -------------------------------------------------------------------------------- /swirl Programming Assignment/Assignment Details Coursera_files/signature_track.js: -------------------------------------------------------------------------------- 1 | define(["jquery","pages/spark/app","js/lib/cookie","js/lib/modals","spark/app/signature/js/signatureTrackLastChanceModal.html","spark/app/signature/js/flexjoinLastChanceModal.html","js/lib/coursera.ab","js/lib/util"],function($,Coursera,Cookie,Modal,signatureTrackLastChanceModal,flexjoinLastChanceModal,AB,util){var functionList={addLastChanceModalInteraction:function($el){if(!Coursera.user.get("last_access_time"))return;var signup_url=Coursera.course.get("host")+"signature/course/"+Coursera.course.get("shortname")+"/"+Coursera.course.get("id"),specialization=Coursera.course.get("specialization");if(specialization)signup_url=Coursera.course.get("host")+"specialization/"+specialization.short_name+"/"+specialization.id;var sigtrackStatus=Coursera.course.get("signatureTrackStatus");if(1!==sigtrackStatus.signature_track_enabled)return;if(1===sigtrackStatus.signature_track_sign_up_now&&!Coursera.user.inSignatureTrack()&&!Coursera.user.isStaffOrSuperuser()){if(1!=Cookie.get("spark_signaturetrack_hide")){var join_label=null,join_st_button=null;if(!specialization){var join_label_id=AB.session.getExperiment("sigtrack_demonstrated_uses2").getChosenVariant();join_label={base:"Earn a Verified Certificate!","show-qualifications":"Show Your New Qualifications with a Verified Certificate","further-qualifications":"Deepen Your Qualifications with a Verified Certificate","list-resume":"Upgrade Your Resume with a Verified Certificate","list-cv":"Upgrade Your C.V. with a Verified Certificate","add-linkedin":"Add Verified Certificates to Your LinkedIn Profile","official-rec":"Earn Official Recognition from Top Universities","rec-achievement":"Get Recognition for Your Achievement with a Verified Certificate","link-identity":"Link Your Coursework to Your Identity","commitment-complete":"Motivate Yourself to Complete with a Verified Certificate","share-certificate":"Share Your Achievement With a Unique Certificate URL","share-records":"Show Your Success with Shareable Course Records","advance-career":"Advance Your Career with Verified Certificates","present-employer":"Gain Workplace Recognition, Earn Your Verified Certificate"}[join_label_id],join_st_button="Get Started"}else if(specialization)join_label='The "'+Coursera.course.get("specialization").name+'" Specialization',join_st_button="Learn More";$("body").prepend("
× "+join_label+" "+join_st_button+"
"),$(".course-signaturetrack-topbanner-close").click(function(){$(".course-signaturetrack-topbanner").hide(),Cookie.set("spark_signaturetrack_hide",1,{expires:new Date("2020"),path:"/"+Coursera.course.get("sessionName")})})}var makeLastChanceModal=function(arg){return $(signatureTrackLastChanceModal({ribbon:arg.ribbon,universityLogo:arg.universityLogo,certBaseImage:arg.certBaseImage,studentName:arg.studentName,course:arg.course,specialization:arg.course.get("specialization"),timeLeft:arg.timeLeft}))},makeFlexjoinModal=function(arg){return $(flexjoinLastChanceModal({ribbon:arg.ribbon,universityLogo:arg.universityLogo,certBaseImage:arg.certBaseImage,studentName:arg.studentName,course:arg.course,specialization:arg.course.get("specialization"),timeLeft:arg.timeLeft,closeDate:arg.closeDate}))};if((sigtrackStatus.signature_track_last_chance_dialog||sigtrackStatus.flexjoin_last_chance_dialog)&&!Coursera.user.get("last_chance_modal")&&!util.isMobileDevice()){var $modalDiv;if(sigtrackStatus.flexjoin_last_chance_dialog)$modalDiv=makeFlexjoinModal({ribbon:Coursera.course.get("assetUnversionedLink")+"/pages/signature/views/ribbon_stripes.png",timeLeft:sigtrackStatus.signature_track_duration_left,course:Coursera.course,studentName:Coursera.user.get("full_name"),certBaseImage:Coursera.course.get("assetUnversionedLink")+"/images/signature/template-cert-preview.png",universityLogo:Coursera.course.get("host")+"/maestro/api/course/"+Coursera.course.get("id")+"/university_logo",closeDate:sigtrackStatus.flexjoin_registration_close_date});else $modalDiv=makeLastChanceModal({ribbon:Coursera.course.get("assetUnversionedLink")+"/pages/signature/views/ribbon_stripes.png",timeLeft:sigtrackStatus.signature_track_duration_left,course:Coursera.course,studentName:Coursera.user.get("full_name"),certBaseImage:Coursera.course.get("assetUnversionedLink")+"/images/signature/template-cert-preview.png",universityLogo:Coursera.course.get("host")+"/maestro/api/course/"+Coursera.course.get("id")+"/university_logo"});var modal=new Modal($modalDiv,{"overlay.class":"coursera-signature-modal-overlay-darker","overlay.close":!1});modal.on("open",function(){if($(".course-signaturetrack-modal-learnmore").on("click",function(){window.open(signup_url+"?utm_source=spark&utm_medium=lastchance")}),Coursera.course.get("specialization"))$(".course-specialization-modal-learnmore").on("click",function(){window.open(signup_url+"?utm_source=spark&utm_medium=lastchance")})}),modal.on("close",function(){Coursera.api.get("signature/user/set_last_chance")}),modal.open()}}}};return functionList}); -------------------------------------------------------------------------------- /swirl Programming Assignment/Assignment Details Coursera_files/student-page.html.js: -------------------------------------------------------------------------------- 1 | !function(wndw){var jadify=function(jade,_t){_t="undefined"!=typeof _t?_t:function(key,interpolationHash){if("object"==typeof interpolationHash)return key.replace(/[#!]\{([^}]+?)\}/g,function(match,interpKey){return interpolationHash[interpKey]||interpKey});else return key};var yudify=function template(locals){var buf=[],jade_mixins={},jade_interp;return buf.push('
'),buf.join("")};return function(locals){if(locals&&locals._t)_t=locals._t.merge(_t);return yudify(locals)}};if("function"==typeof define&&define.amd)define(["js/lib/jade"],function(jade,_t){return jadify(jade,_t)});else wndw.jade.templates["pages.spark.views.template.student-page"]=jadify(wndw.jade.helpers)}(window); -------------------------------------------------------------------------------- /swirl Programming Assignment/Assignment Details Coursera_files/student-page.js: -------------------------------------------------------------------------------- 1 | define(["jquery","backbone","underscore","pages/spark/views/template/student-page.html","js/lib/api","js/core/coursera","js/lib/cookie"],function($,Backbone,_,template,API,Coursera,cookie){var page=Backbone.View.extend({name:"page",subregions:{header:"pages/spark/views/template/header",sidebar:"pages/spark/views/template/sidebar"},initialize:function(){this.bind("view:appended",this.scroll),this.bind("view:updated",this.scroll)},scroll:function(){$("html, body").scrollTop(0),$(window).trigger("scroll")},renderPrioritySupportButton:function(){function showSupportButton(network_name){$("[data-networkprioritysupportwidget]").text(network_name+" Priority Support"),$("[data-networkprioritysupportwidget]").show()}var cookieName="network-priority-support",cookieValue=cookie.get(cookieName);if(cookieValue){try{cookieValue=JSON.parse(cookieValue)}catch(e){return Coursera.multitracker.push(["CPP Priority Cookie Value",cookieValue]),void cookie.clear(cookieName)}if(cookieValue.network_name)showSupportButton(cookieValue.network_name);return}if(Math.random()>.25)return;var path="signature/user/get_premium_support_network",postData={data:{"user-id":Coursera.user.get("id"),"session-id":Coursera.course.get("id")},success:function(d){if(null!==d&&d.network_name)cookie.set(cookieName,JSON.stringify({network_name:d.network_name}),{expires:7,path:"/"+Coursera.course.get("sessionName")}),showSupportButton(d.network_name);else if(null!==d&&d.error)cookie.set(cookieName,JSON.stringify({error:d.error}),{expires:7,path:"/"+Coursera.course.get("sessionName")})},error:function(){}};Coursera.api.get(path,postData)},render:function(){var regions=this.region.regions,self=this,page=$(template());return self.$el.append(page),_.each(["header","sidebar","body"],function(type){if(!regions[type]){if("body"!=type)page.find(".coursera-"+type).hide();else page.find(".coursera-body").replaceWith($("#spark").show());return}page.find(".coursera-"+type).replaceWith(regions[type].view.el)}),this.renderPrioritySupportButton(),self}});return page}); -------------------------------------------------------------------------------- /swirl Programming Assignment/Assignment Details Coursera_files/university_logo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muntasir2165/R-Programming-Assignments-1--2--and-3-/3dd6003062ddf6851a2baa06b04ed96e9eabfb60/swirl Programming Assignment/Assignment Details Coursera_files/university_logo --------------------------------------------------------------------------------