
Alexander D. answered 03/15/19
Tutor
5.0
(63)
Experienced Quantitative Analytics Specialist
myvec <- c()
tempvec <- c("a","b","c","d","e","f","g")
for (i in 1:length(tempvec)){
myvec <- c(myvec,tempvec[i])
print(myvec)
}
- Initializes null myvec.
- Goes through length of tempvec
- Overwrites myvec by appending (in R's case, combining) one vector with another