I've got a question about why does something happen. So, if I do something like this:
prices <- list()
for (i in 1:4){
prices[[i]] <- read.csv(file.choose())
}
prices.df <- as.data.frame(prices)
the prices.df looks like... this:
c.58.846..57.36..57.523..57.538..58.83..52.174..59.195..64.529..
1 58.846
2 57.360
3 57.523
4 57.538
5 58.830
6 52.174
But if I do something like that:
prices <- as.list(c(1:4))
names(prices) <- paste("data", 1:4)
for (i in 1:4){
prices[[i]] <- read.csv...
}
prices.df <- as.data.frame(prices)\
Then it looks ok, so like this:
data.1 data.2
1 58.846 37.830
2 57.360 39.310
3 57.523 43.515
4 57.538 45.080
5 58.830 42.910
6 52.174 45.560
Why is that? I don't get it really...