R-Programming - Assignment 1 - Part 1

April 17, 2015

Report Abuse
This is assignment 1 part 1 for "Introduction to R Programming" course
The function named 'pollutantmean' calculates the mean of a pollutant (sulfate or nitrate) across a specified list of monitors. The function 'pollutantmean' takes three arguments: 'directory', 'pollutant', and 'id'. Given a vector monitor ID numbers, 'pollutantmean' reads that monitor's particulate matter data from the directory specified in the 'directory' argument and returns the mean of the pollutant across all of the monitors, ignoring any missing values coded as NA. This is part of [Introduction to R programming course](https://www.coursera.org/course/rprog) The following figure shows the final pollutant mean for various sensors. ![](http://neerajkh.blob.core.windows.net/images/ass1part1_2.PNG) The experiment graph for this assignment is shown below. For this experiment, we uploaded dataset as zip file, created sample test input as part of enter module data, and finally wrote the function as a script in **Execute-R** module. ![](http://neerajkh.blob.core.windows.net/images/ass1part1.PNG) Created by a Microsoft Employee