I have the vector:
v <- c("godzilla", "jurassic", "googly")
I want the first 3 letters of every element in this vector. I would like to end up with:
# "god" "jur" "goo"
I have already tried using apply
, but it didn't work. What should I do?