What you need to do is to see that is in 'wekt_n_ok' at that point in your
program.  You should be able to see it with str(wekt_n_ok) when the error
occurs.  You can also add a print statement in the loop to print out the
value before it is used with the binary operator.

It would help if you provided 'str' of the various objects you are using, or
maybe some reproducible code.  Somehow you are creating a non-numeric value
in your code; you need to debug it and check all the values before you use
them.

On Sun, May 31, 2009 at 7:05 PM, Grześ <gregorio99@gmail.com> wrote:

>
> Thanks jholtman!
> But I'm not sure what and where I should change my code... :(
> wekt_n = ndf[i,]
> wekt_n_ok = wekt_n[!is.na(wekt_n)]
> If before this line I should change "wekt_n_ok"  as numeric? but if I wrote
> as.numeric(wekt_n_ok) it's also not correct
>
> and  I also don't understand why "wekt_n_ok" is not numeric?
>
> --
> View this message in context:
> http://www.nabble.com/Error%3Anon-numeric-argument-in-my-function-tp23807218p23807873.html
>  Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help@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<http://www.r-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?

	[[alternative HTML version deleted]]


