[R] a function

David Winsemius dwinsemius at comcast.net
Fri Feb 5 23:02:10 CET 2010


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 at 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



More information about the R-help mailing list