[R] R 3.1.2 (x64) Programming Assignment 1: Air Pollution(corr) do not understand the task

Aditya Singh aps6dl at yahoo.com
Wed Nov 19 04:35:57 CET 2014


Eva and Professor Peng,

I spent many hours on Programming Assignment 1, however I was unable to get it right. I found it most useful and think others should work at it too!

Please do send me your work now that the deadline is over. Or you could tell me your Github account so that I could fork it? I will send you my work if you want!

Thanking you in advance,
Dr. Aditya P. Singh
8133/5 Stadium Road,
Patiala 147001 India.



On Wednesday, November 19, 2014 4:52 AM, Евгения-Лиза Шелюхина <evlizashel at gmail.com> wrote:
Dear R experts,

I've submited  correctly "pollutionmean" and "complete" tasks, but "corr"
returns error, despite the beginning of the result is the same as example
output. (screenshot attached)

May be I understood the task wrongly; file of my function is attached, and
it does following:
1) sets directory
2) puts all files from the directory into one dataframe
3) removes NA values
4) creates zero vector "cr"
5) does the cycle:
         for each monitor location (id) counts number of cases "nmb"
         If "nmb" is more than threshold, calculates cor()
         puts cor() result into numeric vector "cr"
6) prints result as numeric vector

I have tried to change cor() function to the complex one with "method" etc,
tried to change "complete.cases" conditions, cycle structure, but it
doesn't help.
I think the reason is I understand task wrongly....
Please, tell me where Im wrong.

Thank you,
Eva

Best Regards,
Evgeniia-Liza Sheliukhina

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list