Description Usage Arguments Value See Also Examples

A faster version of `scale`

with a similar interface that
also allows for imputation. The main difference is that this version scales
by the standard deviation regardless of whether centering is enabled or
not. If centering is enabled, missing values are imputed by 0, otherwise by
the mean of the column that contains the value.

1 | ```
preprocess(X, center = FALSE, scale = FALSE, impute = FALSE)
``` |

`X` |
A numeric matrix. |

`center` |
Either a logical value or numeric vector of length equal to the number
of columns of |

`scale` |
Either a logical value or numeric vector of length equal to the number
of columns of |

`impute` |
Indicates whether missing values should be imputed. |

The centered, scaled, and imputed matrix.

`scale`

, which this function tries to improve upon.

1 2 3 4 5 | ```
# Load example data
bg <- BGData:::loadExample()
# Center and scale genotypes
W <- preprocess(as.matrix(geno(bg)), center = TRUE, scale = TRUE)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.