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 traceback() immediately after the message. Dieter -- View this message in context: http://n4.nabble.com/R-beginner-tp1576033p1576971.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 and provide commented, minimal, self-contained, reproducible code.