plotspc (apply (chondro, 2, range))
avgflu <- apply (flu, 1, mean,
label.spc = expression (bar (I)),
new.wavelength = mean (wl (flu)))
avgflu
flu[[,,405:407]]
apply (flu, 1:2, "*", -1)[[,,405:407]]
## without MARGIN the whole matrix is handed to FUN
apply (flu [,,405:407], , print) [[]]
## whereas MARGIN = 1 : 2 leads to FUN being called for each element separately
apply (flu [,,405:407], 1 : 2, print) [[]]
Run the code above in your browser using DataLab