editGenotypes | R Documentation |
The genotypes from an object of one of the subclasses of gendata
are converted to a data frame (if necessary), then displayed in the data
editor. After
the user makes the desired edits and closes the data editor window, the
new genotypes are written to the gendata
object and the object is
returned.
editGenotypes(object, maxalleles = max(Ploidies(object)), samples = Samples(object), loci = Loci(object))
object |
An object of the class |
maxalleles |
Numeric. The maximum number of alleles found in any given genotype.
The method
for |
samples |
Character or numeric vector indicating which samples to edit. |
loci |
Character or numeric vector indicating which loci to edit. |
The method for genambig
lists sample and locus names in each row
in order to identify the genotypes. However, only the alleles
themselves should be edited. NA values and duplicate alleles in the
data editor will be
omitted from the genotype vectors that are written back to the
genambig
object.
An object identical to object
but with edited genotypes.
Lindsay V. Clark
viewGenotypes
, Genotype<-
,
Genotypes<-
if(interactive()){ #this line included for automated checking on CRAN # set up "genambig" object to edit mygen <- new("genambig", samples = c("a", "b", "c"), loci = c("loc1", "loc2")) Genotypes(mygen, loci="loc1") <- list(c(133, 139, 142), c(130, 136, 139, 145), c(136, 142)) Genotypes(mygen, loci="loc2") <- list(c(202, 204), Missing(mygen), c(200, 206, 208)) mygen <- reformatPloidies(mygen, output="one") Ploidies(mygen) <- 4 # open up the data editor mygen <- editGenotypes(mygen) # view the results of your edits viewGenotypes(mygen) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.