Converts the genotype matrix (geno slot) of a SNPDataLong object to a data.frame, with optional centering and scaling per SNP (column).

genoToDF(object, center = FALSE, scale = FALSE)

Arguments

object

An object of class SNPDataLong.

center

Logical or numeric. If TRUE (default FALSE), center columns to mean zero.

scale

Logical or numeric. If TRUE (default FALSE), scale columns to standard deviation one.

Value

A data.frame with individuals as rows and SNPs as columns (numeric 0/1/2, or centered/scaled values).

Examples

if (FALSE) { # \dontrun{
df <- genoToDF(nelore_imputed, center = TRUE, scale = TRUE)
head(df[, 1:5])
} # }