Skip to content
Back to formatted view

Raw Message

Message-ID: <1351800418911-4648169.post@n4.nabble.com>
Date: 2012-11-01T20:06:58Z
From: mdvaan
Subject: Reduce(paste, x) question
In-Reply-To: <CAFEqCdx1iaz_2aBQ0GSMpLuCess7DOsW5nsEBLtHkJ1Ub9CONA@mail.gmail.com>

I should have been more specific:

y <- list()
a <- c("A", "K")
b <- c("B", "L")
c <- c("C", "M")
d <- c("D", "N")
e <- c("E", "O")

y[[1]] <- a
y[[2]] <- b
y[[3]] <- c
y[[4]] <- d
y[[5]] <- e

y
[[1]]
[1] "A" "K"

[[2]]
[1] "B" "L"

[[3]]
[1] "C" "M"

[[4]]
[1] "D" "N"

[[5]]
[1] "E" "O"

How do I get a list object like y (each element of y is a vector of strings)
from:

x[[1]] <- LETTERS[1:5]
x[[2]] <- LETTERS[11:15]

using only the Reduce function?

Thanks!



--
View this message in context: http://r.789695.n4.nabble.com/Reduce-paste-x-question-tp4648151p4648169.html
Sent from the R help mailing list archive at Nabble.com.