Generic function for preprocessing
prep.generic(x, f, ...)
x
data matrix to be preprocessed
f
function for preprocessing
...
arguments for the function f