How do concat a vector of character in R?

I tried using the paste command but it returns the same vector?

x = c("a","b","c")
y = paste(x)
y
[1] "a" "b" "c"
length(y)
[1] 3

I want a single character of "abc"

Answers


The collapse="" options is your friend:

> x <- c("a", "b", "c")
> paste(x, collapse="")
[1] "abc"
> 

[ There is still no rstats tag here. ]


Need Your Help

Ruby on Rails and SSL error

ruby-on-rails ssl

I formatted my computer and transferred all my RoR applications to my new Lubuntu System.

How to connect QItemDelegate (QLineEdit) change to QSortFilterProxyModel PyQt4?

python pyqt pyqt4 qtableview qitemdelegate

I tried to set a QlineEdit by subclassing QItemDelegate in first row of my QtableView: