getMisc | R Documentation |
Get miscelaneous information in a population
getMisc(x, node = NULL)
x |
|
node |
character, name of the node to get from the |
The x@misc
slot or its nodes x@misc[[*]][[node]]
founderGenomes <- quickHaplo(nInd = 3, nChr = 1, segSites = 100)
SP <- SimParam$new(founderGenomes)
basePop <- newPop(founderGenomes)
basePop <- setMisc(basePop, node = "info", value = 1)
basePop@misc
getMisc(x = basePop, node = "info")
basePop <- setMisc(basePop, node = "info2", value = c("A", "B", "C"))
basePop@misc
getMisc(x = basePop, node = "info2")
n <- nInd(basePop)
location <- vector(mode = "list", length = n)
for (ind in seq_len(n)) {
location[[ind]] <- runif(n = 2, min = 0, max = 100)
}
location
basePop <- setMisc(basePop, node = "location", value = location)
basePop@misc
getMisc(x = basePop, node = "location")
n <- nInd(basePop)
location <- vector(mode = "list", length = n)
for (ind in c(1, 3)) {
location[[ind]] <- runif(n = 2, min = 0, max = 100)
}
location
basePop <- setMisc(basePop, node = "location", value = location)
basePop@misc
getMisc(x = basePop, node = "location")
getMisc(x = basePop)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.