Description Usage Arguments Details Value Author(s) See Also Examples
This function adds new markers to the element geno
of an object of
class gpData
and updates the marker map.
1 | add.markers(gpData, geno, map = NULL)
|
gpData |
object of class |
geno |
|
map |
|
rownames
in argument geno
must match rownames
in the
element geno
object of class gpData
.
object of class gpData
with new markers
Valentin Wimmer
add.individuals
, discard.markers
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | # creating gpData object
# phenotypic data
pheno <- data.frame(Yield = rnorm(10, 100, 5), Height = rnorm(10, 10, 1))
rownames(pheno) <- 1:10
# genotypic data
geno <- matrix(sample(c(1, 0, 2, NA),
size = 120, replace = TRUE,
prob = c(0.6, 0.2, 0.1, 0.1)
), nrow = 10)
rownames(geno) <- 1:10
# genetic map
map <- data.frame(chr = rep(1:3, each = 4), pos = rep(1:12))
colnames(geno) <- rownames(map) <- paste("M", 1:12, sep = "")
# as gpData object
gp <- create.gpData(pheno, geno, map)
# new data
geno2 <- matrix(c(0, 0, 1, 1, 1, 2, 2, 1, 1, 2, 1, 2, 0, 2, 1, 1, 1, 2, 2, 2), ncol = 2)
rownames(geno2) <- 1:10
map2 <- data.frame(pos = c(0.3, 5), chr = c(1, 2))
rownames(map2) <- colnames(geno2) <- c("M13", "M14")
# adding new markers
gp2 <- add.markers(gp, geno2, map2)
summary(gp2)
summary(gp)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.