Re: [R] sapply or apply

2010-06-17 Thread Joshua Wiley
Hello Roslina, Maybe it is just me, but I have difficulty picking apart what you are trying to do because, the data have the same names as the arguments in your functions, and when you create the function term(), you have two sets of arguments (for term() and for gam_sum() ) that have the same

[R] sapply or apply

2010-06-16 Thread Roslina Zakaria
Hi r-users, I have this code here : dt   - winter_pos_sum bt   - c(24.96874, 19.67861, 23.51001, 19.86868); round(bt,2) alp  - c(2.724234, 3.914649, 3.229146, 3.120719); round(alp,2) bt_min  - min(bt) ; bt_min p   - alp_sum    ; p t  - 50 t1 - t+1     #first get the sum over the