A class to store multilocus genotypes in genclone objects. This is intended for internal use only.
a list containing four vectors, one for each type of MLG manipulation.
a character specifying which MLG type is to be displayed and accessed.
the name of the distance function or matrix used to collapse mlgs.
the environment that contains the distance function or matrix
the arguments provided to compute the distance function.
the algorithm used to contract multilocus genotypes.
Two numbers specifying the cutoff value for expanding and collapsing MLGs.
Zhian N. Kamvar
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
# These examples will simply show you what you can do with these set.seed(5000) (x <- sample(10, 20, replace = TRUE)) (m <- new("MLG", x)) visible(m) # original is always default m # adding braces after the object will always return a vector of # the same type as defined in "visible" m + 1 # You can do math on the numeric ones visible(m) <- "custom" m + 2 # This should throw a warning # The types are stored in a data frame. You can retrieve them easily: visible(m) <- "original" m m[, "custom"] # Important for subsetting, if you subset the object, normally, it will # return a vector unless you specify all = TRUE m[1:10] # original vector m[1:10, all = TRUE] # still class MLG
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.