View source: R/plot.haptable.R
plot.haptable | R Documentation |
Plot a haptable object, which is the result of running haptable
on a haplin
result, and (optionally) produce picture files.
## S3 method for class 'haptable'
plot(x, separate.plots = F, filename,
filetype = "png", use.dd, verbose = T, ...)
x |
A |
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 |
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. |
verbose |
Turns on or off some minor comments when plotting |
... |
Further arguments to be passed on to the plot function |
Further information is found on the web page.
Hakon K. Gjessing
Professor of Biostatistics
Division of Epidemiology
Norwegian Institute of Public Health
hakon.gjessing@uib.no
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
haplin
## Not run:
# Directly plotting the haplin result. 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")
# Create haptable from the haplin result and plot the results in the table:
res <- haplin("data.dat", use.missing = T, maternal = T)
tab <- haptable(res)
plot(tab)
# Create haptables for the 10 first markers of a data file using haplinSlide.
# Create plots for each result:
res <- haplinSlide("data.dat", markers = 1:10, use.missing = T, maternal = T, table.output = T)
lapply(res, plot)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.