I need to remove the last number in a groups of vectors, i.e.:
v <- 1:3 v1 <- 4:8
should become:
v <- 1:2 v1 <-
Use length to get the length of the object and - to remove the last one.
v[-length(v)]
A negative index in R extracts everything but the given indices.