-3

In R I have a dataset data

tts 21y
ttt 52k
...

These are all strings and dim(data)=1000 2. I want to combine the rows so I can get a new data newdata

tts21y
ttt52k
...

Here we have taken both strings in a row and combined them into a longer string. How can I do this in R ?

Ole Petersen
  • 670
  • 9
  • 21

1 Answers1

1

you can try the following:

paste0(data[,1], data[,2])
jogo
  • 12,469
  • 11
  • 37
  • 42