Displaying 1 result from an estimated 1 matches for "rpf3n".
Did you mean:
rpf1
2002 Jun 11
2
Puzzled by what Rprof is telling me
...9; is a
numeric matrix with 128347 rows; I need to apply a function, sfun(),
to each of 4191 subsets of rows, indexed by indat$grpi. sfun() is
fairly complex, and requires information from all of the columns of
inmat, so simple uses of, for example, aggregate() don't do the job.
Rprof('Rpf3n')
for (i in unique(indat$grpi)) {
ssnew[i,] <- sfun(inmat[indat$grpi==i,,drop=FALSE])
}
Rprof(NULL)
----------------- Rprof output, v1 ----------------
Each sample represents 0.02 seconds.
Total run time: 404.999999999922 seconds.
Total seconds: time spent in function and callees.
Self...