Set up data for reading into flash.

flash_set_data(Y, S = NULL)

Arguments

Y

an n by p data matrix

S

An n by p matrix of the standard errors of observations of Y. (Can be a scalar if all elements of the matrix are equal.)

Value

A flash data object.

Details

Y can have missing data, but no column or row can be entirely missing. The flash data object contains flags for dealing with missing data and a (naively) imputed version of the original data matrix so that i) some of the initializatinon methods used by flash (eg svd) do not fail ii) data$Y * data$missing is 0 if the original data were missing.