Print Genotypes to the Console
viewGenotypes prints a tab-delimited table of samples, loci, and
alleles to the console so that genotypes can be easily viewed.
viewGenotypes(object, samples = Samples(object), loci = Loci(object))
An object of
one of the
A numerical or character vector indicating which samples to display.
A numerical or character vector indicating which loci to display.
viewGenotypes is a generic function with methods for
genambig object, a header line indicating sample, locus,
and allele columns is printed.
Genotypes are printed below this. Genotypes are ordered first by locus
and second by sample.
genbinary object, the presence/absence matrix is printed,
organized by locus. After the matrix for one locus is printed, a blank
line is inserted and the matrix for the next locus is printed.
No value is returned.
Lindsay V. Clark
1 2 3 4 5 6 7 8 9 10 11
# create a dataset for this example mygen <- new("genambig", samples=c("ind1", "ind2", "ind3", "ind4"), loci=c("locA", "locB")) Genotypes(mygen) <- array(list(c(98, 104, 108), c(100, 104, 110, 114), c(102, 108, 110), Missing(mygen), c(132, 135), c(138, 141, 147), c(135, 141, 144), c(129, 150)), dim=c(4,2)) # view the genotypes viewGenotypes(mygen)
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.