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

Евгения-Лиза Шелюхина evlizashel at gmail.com
Tue Nov 18 22:33:24 CET 2014

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,

Best Regards,
Evgeniia-Liza Sheliukhina

More information about the R-help mailing list