toDataFrame: Stack dataframes from haplinSlide into a single dataframe

View source: R/toDataFrame.R

toDataFrameR Documentation

Stack dataframes from haplinSlide into a single dataframe

Description

When haplinSlide is run with the option table.output = T, the result is a list of haptables, i.e. tables with summary haplin results for each window haplinSlide is run on. toDataFrame stacks the separate dataframes into one large dataframe containing all results.

Usage

toDataFrame(x, reduce = F) 

Arguments

x

The output from haplinSlide run with option table.output = TRUE.

reduce

Reduce output to one line per marker

Details

When haplinSlide is run with winlength = 1 on SNP markers, each table in the output has only two rows, and can be condensed to a single row. By setting the argument reduce to TRUE, toDataFrame reduces each table to one line and returns a dataframe with one line for each SNP. In more general situations, with multi-allelic markers or, more commonly, winlength set to 2 or more, each output table will typically have more than two rows and cannot be reduced, so reduce should be set to FALSE.

Value

The output is a dataframe. First column contains the marker names. Second column are row numbers, counted within each output table. The remaining columns are identical to the individual output columns, which are described in more detail in the help file for haptable.

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://people.uib.no/gjessing/genetics/software/haplin/


Haplin documentation built on May 20, 2022, 5:07 p.m.