sent this to the list yesterday but didn't see it listed in the daily
summary ... apologies if you receive it 
twice ...

________________________________

From: Afshartous, David 
Sent: Tuesday, June 27, 2006 10:02 AM
To: 'r-help@stat.math.ethz.ch'
Subject: sapply question


All:
 
I'm trying to use sapply to break up data within another function.
(tapply doens't seem to work since I want to access several variables of
a 
data set, not just break up a single variable according to a factor.)
I tried the R documentation but that wasn't much help on this.
 
The first function in the attached file works, breaking up the data
according to patient number (6 
observations per 24 patients) via a for loop i=1,..24. 
 
The second function is an attempt to use sapply instead of the first
"for loop".    
it doesn't load properly and I seem to be absolutely blind as to why; my
guess is that
it's something "obvious".  any help appreciated.  (necessary data
attached)
 
thanks!
dave  
 
ps:
I'm on windows and,
r.2 =100  (input to function)
dat = comp.CAND.frm (attached file)


	[[alternative HTML version deleted]]

