I am trying to write a function that adds a variable number of vectors to a matrix.

This is how I get the vectors x1 - xi

```
for (i in 2:ncol(datasource))
{
temp1 <- paste("x", i-1, sep = "")
assign(temp1, as.numeric(unlist(datasource[i])))
}
```

from datasources with varying numbers of columns. So what I want to do is:

```
df <- data.frame()
for (i in 2:ncol(carprices))
{
df <- cbind(paste("x", i-1, sep = ""))
}
```

for the number of x1-xi vectors there are. But this doesn't work since the output of paste() is of mode "character". Is there another function that could combine the letter x with i and return it so that it is interpreted as vector by cbind()?

Thank you all very much in advance!