0

I am a noob to R and I have a data set that is similar to this:

   room1   MLT   153
   room1   GMV   188
   room1   TWV   258
   room2   MLT   585
   room2   GMV   698
   room2   TWV   400
   room3   MLT   888
   room3   GMV   481
   room4   MLT   081

The first column is replicated duplicates of room1, room2 ect. Column 2 has the corresponding replicates. I want the data like this:

       MLT GMV TWV
room1  153 188 258
room2  585 698 400
room3  888 481 NA
room4  081 NA  NA

Note: I don't want to use this data. I want a formula in general in R for changing replicated duplicates together to recreate the data frame. Thanks.

I'm guessing this is a pretty frequent question. I haven't found videos or questions for this simple mundane question anywhere on the internet.

Brian D
  • 79
  • 7

0 Answers0