Description Usage Arguments Value Examples
Calculate offsets
1 | calc_offsets(segments, segment_id, segment_min = "min", segment_max = "max")
|
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 |
A data.frame
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.