On Feb 5, 2010, at 3:33 PM, li li wrote:
Dear all, I need to write the following function in R. Can anyone give me some hint? Thank you! Please see the attachment for the function. Hannah <question to R-heip.pdf>______________________________________________
A three argument function with two instances of sapply and the function choose should get you there pretty quickly.
-- David.
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.
David Winsemius, MD Heritage Laboratories West Hartford, CT ______________________________________________ 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.