Learn R Programming

strvalidator (version 1.7.0)

heightToPeak: Height To Peak.

Description

Internal helper function to convert a peak into a plottable polygon.

Usage

heightToPeak(data, width = 1, keep.na = TRUE, debug = FALSE)

Arguments

data
data frame containing at least columns 'Height' and 'Size'.
width
numeric specifying the width of the peak in bp.
keep.na
logical, TRUE keep empty markers.

Value

data.frame with new values.

Details

Converts a single height and size value to a plottable 0-height-0 triangle/peak value. Makes 3 data points from each peak size for plotting a polygon representing a peak. Factors in other columns might get converted to factor level.