gsumby: Sumby

Description Usage Arguments Details Value Author(s) Examples

View source: R/04operations.R

Description

Find sub-sums of a gvector

Usage

1
gsumby(v, startPos, stopPos)

Arguments

v

a gvector

startPos

a vector of start positions

stopPos

a vector of stop positions

Details

startPos and stopPos must be of the same length.

Value

returns a gvector object of the same length as startPos and stopPos. Each element is the sum of elements in v.

Author(s)

Nathan Morris

Examples

1
gsumby(g(1:10), c(1,6), c(5,10)) # g(c(15,40))

njm18/gmatrix documentation built on May 23, 2019, 7:07 p.m.