1

I have a column in a dataframe that looks like this:

df <- data.frame(ID = c(0111,0112,1124,2389,3480,0134))

ID
0111
0112
1124
2389
3480
0134

How can I get all these values in what I think it is a list format? I need to obtain the following output:

0111;0112:1124;2389;3480;0134
jessirocha
  • 339
  • 1
  • 10

1 Answers1

1

Have you tried this?

paste(df$ID,collapse=';')

cianius
  • 1,926
  • 6
  • 21
  • 40