Hi, There is a lot of if-else statement. r syntax rejects them. Here is an example of if-else example. In r we can code *ifelse(x>2,y <- 1,ifelse(x>1,y <- 0.5, y <- 0))* for the following.
if (x > 2) { y = 1 } else { if (x > 1) { y = 0.5 } else { y = 0 } } ----- JS Huang -- View this message in context: http://r.789695.n4.nabble.com/help-on-output-my-own-function-result-in-ddply-tp4704238p4704240.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.