# NOT RUN {
# Generate a sample data set consisting of 10 rows and 12 columns,
# and randomly replace 5 of the values by "NN".
mat <- matrix("", 10, 12)
mat[1:5,] <- sample(c("AA", "AB", "BB"), 60, TRUE,
prob = c(0.49, 0.42, 0.09))
mat[6:10,] <- sample(c("AA", "AB", "BB"), 60, TRUE,
prob = c(0.09, 0.42, 0.49))
mat[sample(120, 5)] <- "NN"
mat
# Recode the SNPs.
recodeAffySNP(mat)
# Recode the SNPs assuming that "A" is always the major allele.
recodeAffySNP(mat, refAA = TRUE)
# }
Run the code above in your browser using DataLab