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

David Winsemius dwinsemius at comcast.net
Wed Nov 19 00:25:56 CET 2014


This is not the help forum for Coursera classes.

-- 
David.


On Nov 18, 2014, at 1:33 PM, Евгения-Лиза Шелюхина 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.

David Winsemius
Alameda, CA, USA



More information about the R-help mailing list