Learn R Programming

Haplin (version 7.3.2)

output: Save files with summary, table, and plot from a haplin object.

Description

Create summary tables and figure from a haplin object. Save results as separate files in a specified directory.

Usage

output(object, dirname, ask = T)

Arguments

object

A haplin object, i.e. the result of running haplin.

dirname

Text string, for instance "c:/work/haplinresults". Name of directory where results should be saved. Default is to save results in the current working directory.

ask

Logical. If TRUE (default), you will be asked before overwriting any files with the same name. If FALSE, output will overwrite without warning.

Author

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

Details

After having run haplin and saved the result (in the R workspace), the output function will extract summary results, a summary table, and a plot of the results and save them to the specified directory. The filenames will be haplin_summary.txt, haplin_table.txt and haplin_plot.jpg, respectively. output simply uses the available functions summary, haptable, and plot to produce the files, but is a quick way of saving all the relevant results.

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) {

# Run haplin and save results in separate files 
# in the c:\work\haplinresults directory:
res <- haplin("data.dat", use.missing = T, maternal = T)
output(res, dirname = "c:/work/haplinresults")
}

Run the code above in your browser using DataLab