Re: [S] SUMMARY: Beginner Question on apply() & tapply()

John Wallace (jrw@fish.washington.edu)
Tue, 2 Jun 1998 00:39:51 -0700 (PDT)


On Mon, 1 Jun 1998, Marc Feldesman wrote:

> Thanks to all who quickly responded to my question regarding the use of
> apply() & tapply(). I won't repeat the problem, but several different, but
> equally effective solutions emerged, none involving apply() or tapply()
> directly.

Well, we can't let tapply() get so short changed.

tapply(1:nrow(headdata), headdata[,8], function(x) var(headdata[x,2:5]))

-- 
John Wallace
University of Washington                    ^    ^    ^
Fisheries Research Institute               / \  / \  / \   ^
Box 357980                                 / \  / \   |   / \
Seattle, WA 98195-7980                      |    |  o__~  / \
PHONE   (206) 543-1513                  @ @         /\/\   |
FAX     (206) 685-7471                   ~    
E-MAIL        jw@u.washington.edu              o
WWW      http://www.fish.washington.edu/people/jrw/Wallace.html 
                                                o  _///_ //
                                                <`)=  _<<
                                                    \\\  \\

----------------------------------------------------------------------- This message was distributed by s-news@wubios.wustl.edu. To unsubscribe send e-mail to s-news-request@wubios.wustl.edu with the BODY of the message: unsubscribe s-news