function to be applied to value (and meta if FUN_meta is NULL)
FUN_meta
function to be applied to metadata. If NULL (default), same
FUN applied to value is used.
...
extra args to FUN
Author
Jose Eduardo Meireles
Details
Argument FUN_meta is useful if you want to apply a different function to
metadata and value. If you want to aggregate spectra and metadata
using `mean`, `sd`, `median` etc. but try to keep the text values, wrap your
function in try_keep_txt(f).