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

View source: R/output.R

outputR Documentation

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.

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.

Note

Further information is found on the web page.

Author(s)

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

## Not run: 

# 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")

## End(Not run)

Haplin documentation built on Sept. 11, 2024, 7:13 p.m.