Learn R Programming

Haplin (version 7.3.2)

plot.haplin: Plot a haplin object

Description

Plot a haplin object and (optionally) produce picture files

Usage

# S3 method for haplin
plot(x, reference, separate.plots = F, filename, 
filetype = "png", use.dd, ...)

Arguments

x

A haplin object, i.e. the result of running haplin. This is the only required argument.

reference

Same as reference argument in haplin. Note that when plotting, you can only choose "reciprocal", "population" or "ref.cat". You cannot use a numeric value to change the reference category, to do that haplin must be run over again. (See the reference argument of haplin.)

separate.plots

Logical. If you estimate effects of both fetal and maternal genes you can decide whether or not to plot them in the same plot. The default is the same plot (TRUE), the alternative (FALSE) means in separate plots. If you choose separate plots you may have to set the graphics window to "recording" to make sure you can scroll back to the first plot.

filename

If you want a file containing the plot to be produced, give a character string for the filename.

filetype

The default filetype is "png", alternatively you can choose "jpeg".

use.dd

Numeric vector indicating which double dose estimates should be plotted. For instance, if set to c(1,3) only the first and third haplotypes will be drawn with double dose estimates. This is useful if some haplotypes are rare and you want to exclude the uncertain estimates from the plot.

...

Further arguments to be passed on to the plot function

Author

Hakon K. Gjessing
Professor of Biostatistics
Division of Epidemiology
Norwegian Institute of Public Health
hakon.gjessing@uib.no

References

Gjessing HK and Lie RT. Case-parent triads: Estimating single- and double-dose effects of fetal and maternal disease gene haplotypes. Annals of Human Genetics (2006) 70, pp. 382-396.

Web Site: https://haplin.bitbucket.io

See Also

haplin

Examples

Run this code
if (FALSE) {

# Produce separate plots for child and mother, dump plots to files:
res <- haplin("data.dat", use.missing = T, maternal = T)
plot(res, separate.plots = T, filename = "Haplinres.png")

}

Run the code above in your browser using DataLab