`y <- c()
for( position in c("cannon","jackson","benford","paws","moxie") ) {
n <- nchar(position)
y[position] <- letters[n]
}
y
n
What I am essentially trying to do is write the code that is behind the scenes of this for loop but I am running into issues as to where to go with it. What would this for loop expanded look like?