plot.genotype: Plot genotype object

Description Usage Arguments Value Author(s) See Also Examples

View source: R/plot.genotype.R

Description

plot.genotype can plot genotype or allele frequency of a genotype object.

Usage

1
2
3
## S3 method for class 'genotype'
plot(x, type=c("genotype", "allele"),
  what=c("percentage", "number"), ...)

Arguments

x

genotype object, as genotype.

type

plot "genotype" or "allele" frequency, as character.

what

show "percentage" or "number", as character

...

Optional arguments for barplot.

Value

The same as in barplot.

Author(s)

Gregor Gorjanc

See Also

genotype, barplot

Examples

1
2
3
4
5
  set <- c("A/A", "A/B", "A/B", "B/B", "B/B", "B/B",
           "B/B", "B/C", "C/C", "C/C")
  set <- genotype(set, alleles=c("A", "B", "C"), reorder="yes")
  plot(set)
  plot(set, type="allele", what="number")

Example output

Loading required package: combinat

Attaching package: 'combinat'

The following object is masked from 'package:utils':

    combn

Loading required package: gdata
sh: 1: cannot create /dev/null: Permission denied
gdata: Unable to locate valid perl interpreter
gdata: 
gdata: read.xls() will be unable to read Excel XLS and XLSX files
gdata: unless the 'perl=' argument is used to specify the location of a
gdata: valid perl intrpreter.
gdata: 
gdata: (To avoid display of this message in the future, please ensure
gdata: perl is installed and available on the executable search path.)
sh: 1: cannot create /dev/null: Permission denied
gdata: Unable to load perl libaries needed by read.xls()
gdata: to support 'XLX' (Excel 97-2004) files.

gdata: Unable to load perl libaries needed by read.xls()
gdata: to support 'XLSX' (Excel 2007+) files.

gdata: Run the function 'installXLSXsupport()'
gdata: to automatically download and install the perl
gdata: libaries needed to support Excel XLS and XLSX formats.

Attaching package: 'gdata'

The following object is masked from 'package:stats':

    nobs

The following object is masked from 'package:utils':

    object.size

The following object is masked from 'package:base':

    startsWith

Loading required package: gtools
Loading required package: MASS
Loading required package: mvtnorm


NOTE: THIS PACKAGE IS NOW OBSOLETE.



  The R-Genetics project has developed an set of enhanced genetics

  packages to replace 'genetics'. Please visit the project homepage

  at http://rgenetics.org for informtion.




Attaching package: 'genetics'

The following objects are masked from 'package:base':

    %in%, as.factor, order

genetics documentation built on March 1, 2021, 9:06 a.m.