I want to add some strings after each element in the matrix or factor of the stock tickers.

```
require(stringr)
tickers <- as.factor(c(002707, 002712, 300397, 300213, 600304, 300245))
stocks <- c()
foo = function() for(i in 1 : length(tickers)){
  if(substr(tickers[i], 1, 1) < 6) {
    stocks[[i]] <- paste(str_pad(tickers[[i]],width=6,side="left",pad="0"),"SZ",sep=".")
  } else {
    stocks[[i]] <- paste(tickers[[i]],"SS",sep=".")
  }
  return(stocks)
}

foo()

```

What I got is just the 

```
> foo()
[1] "002707.SZ"

```

not the full updated value for the stock tickers, what happen here?