I have the following character vector of length 3:
test <- c("old_information", "old_car", "old_sting")
typeof(test) --> [1] "character"
length(test) --> [1] 3
I want to iterate through each element of test
so it ultimately turns into the equivalent of:
test <- c("information", "car", "sting")
In other words: I would want to maintain the length of the character array but eliminate the same number of elements from each component (the 4 characters that spell 'old_' in front of each element.)
How could I do this?