I am quite new to the R area. During an assignment "Air pollution" in Coursera, I tried to write a function that returned the mean to the accumulated dataset.