Skip to content
Prev 75144 / 398502 Next

R: cbind

On 8/8/05, Clark Allan <Allan at stats.uct.ac.za> wrote:
There are a number of alternatives:

# 1. just create a list

x1 <- list(a = 1, b = 1:3, c = 1:4)

# 2. create a ts object:

x2 <- do.call("cbind", lapply(x1, ts))

# 3. create a matrix from the ts object 

x3 <-  unclass(do.call("cbind", lapply(d, ts)))
tsp(x3) <- NULL