0

So i am trying to convert a file with over a million rows which looks like below for example:

A 1

B 7

A 15

B 2

D 25

A 3

C 12

B 9

But with a lot more rows. I want to convert this data frame into the format below:

A 1 15 3

B 7 2 9

C 12

D 25

I've used this so far:

subset(rawdata, !duplicated(rawdata$Col1)) 

where rawdata is the dataset. But this just gives the first corresponding value associated with each unique column.

m0nhawk
  • 22,980
  • 9
  • 45
  • 73
user1834217
  • 39
  • 1
  • 8

0 Answers0