[R] R beginner

Dieter Menne dieter.menne at menne-biomed.de
Wed Mar 3 19:09:10 CET 2010

azman wrote:
> i'am is new in R software.i have try to make a function but it can't give
> what it should.i dunno what have to do next.
> Can somebody help me to solve it.i'll very appreciate...

Your example is nice, because it is self-contained (even if there is a
buglet). When I run it, I got a message that "object  y1 is not found". That
comes from a line

if (y1<=0) ...

which suspiciously looks like a remainder of an old version that ended up at
the wrong place. Remove this, and also remove two {} below it which do no
harm, but are confusing. Program looked reasonably after this. I also
recommend to use good indentation, but it is possible that is has been
removed by the mailer.

If you are lost again by an error message from a deeply nested call: use


immediately after the message.


View this message in context: http://n4.nabble.com/R-beginner-tp1576033p1576971.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list