View source: R/expire_status_by_inventory.R
| cumsum_bounded | R Documentation |
a version of cumsum that will stay within specified boundaries
cumsum_bounded(v, low = 0, high = Inf)
v |
a numeric vector |
low |
numeric; lower bound |
high |
numeric; upper bound |
a numeric vector
cumsum_bounded(c(0,-1,-100,1,7,-99,1,1,1,-1), low = -50)
cumsum_bounded(c(0,-1,-100,1,7,-99,1,1,1,-1)) ## low = 0 is default
cumsum_bounded(c(0,-1,-100,1,7,-99,1,1,1,-1), high = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.