Dear List,
I have a 2,000x10,000 array of time domain data which when plotted draws
a distinct pulse. The matrix is 10,000 pulses of length 2000. I would
like the pulse to be shifted so that the peak (which.max of the pulse
data) is consistently at point 400.
I don't want to use loops as it'll take a long time. The problem with
using apply is the pulse peak varies for each pulse, so I want to use
something like:
apply(really_mean_pulse, 2, shift, which.max(really_mean_pulse))
(Using the shift function from the "magic" library)
This doesn't work, so I need to modify this so that the argument to
shift is dependent on the column the shift is being applied to.
Any suggestions would be greatly appreciated!
Kind Regards,
Jim Hargreaves
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.