R/trimLeading.R
trim_leading_values.Rd
trim leading repeats of a given value from a vector
trim_leading_values(x, value = 0)
vector of the same type as value
value
value of which to remove leading repeats
a vector trimmed of all leading values equal to value
Charles Morefield
trim_leading_values(c(0,0,0,1,2,3)) #> [1] 1 2 3 trim_leading_values(c('a','a','d','e'), 'a') #> [1] "d" "e"