[R] help with vector operation

eesteves@ualg.pt eesteves at ualg.pt
Mon Jan 31 18:29:42 CET 2005


Dear All,

I'm trying to calculate the following:

g.rate<-(SL-int)/NO

where SL and NO are individual length and counts for the same subject, and the
int value is a day-specific value i.e. for each DAY=88, 101..., 172 I'd like to
use a different values of int=9.32, 8.43, ..., 9.81. All variables are compiled
in a larger data.frame of the form:

CODE  SL    NO  DAY (...)
123   12.5  14  88
124   11.4  13  88
125   10.8  11  101
(...)
234   16.9  19  172 (...)

I've been trying apply() but with little (NONE) success!
Thanks, Eduardo Esteves




More information about the R-help mailing list