Xiao-Jun Ma-2 wrote:
>
> I'm trying to collapse a character vector to strings, but I am getting
> unexpected behaviors in list context:
> A <- "a"
> B <- c("b","c")
>
> xx <- list(A=A, B=B)
>
> lapply(xx, paste, collaplse=".")
>
Typing error in collapLse
Dieter
--
View this message in c
Hi,
I'm trying to collapse a character vector to strings, but I am getting
unexpected behaviors in list context:
A <- "a"
B <- c("b","c")
xx <- list(A=A, B=B)
lapply(xx, paste, collaplse=".")
$A
[1] "a ."
$B
[1] "b ." "c ."
paste(B, collapse=".")
[1] "b.c" # this is what I
2 matches
Mail list logo