calc_offsets: Calculate offsets

Description Usage Arguments Value Examples

Description

Calculate offsets

Usage

1
calc_offsets(segments, segment_id, segment_min = "min", segment_max = "max")

Arguments

segments

A data.frame describing max and min of each segment

segment_id

A variable to describe the segments for which to calculate offsets. Converted to factor. Need to be the same as the number of rows.

segment_min

A variable in offsets describing the minimum of each segment

segment_max

A variable in offsets describing the maximum of each segment

Value

A data.frame

Examples

1
2
3
4
5
6
segments <- data.frame(
  segment = LETTERS[1:4],
  min = c(0, 2, 0, 0),
  max = c(3,4,3,2)
)
calc_offsets(segments, "segment", "min", "max")

alexwhan/beadplot documentation built on May 10, 2019, 8:58 a.m.