prepData function

Preprocessing of the data streams and covariates