getstretchid: make a stretch id from a date or something

View source: R/makestretchid.R

getstretchidR Documentation

make a stretch id from a date or something

Description

make a stretch id from a date or something

Usage

getstretchid(stretches)

Arguments

stretches

a numeric or character vector to convert into a stretchid

Details

i do this all the time, but probably there is a cleverer pattern where you don't need to do it that i don't know about

Value

a stretchid numeric vector starting at 1

Examples

# consider a date vector
v1 <- c("2019-01-01", "2019-01-01", "2019-01-02", "2019-01-03")

# get the stretches
getstretchid(v1)

williamcioffi/chf documentation built on June 9, 2022, 5:38 p.m.