0

I have all variable names on one column and underneath it, there are all corresponding values. Each variable name and value are separated by a comma. I would like to have all variable names on separate columns and underneath each value corresponding to a variable for each id. How do I get them separate?

Thanks!

mystery file

marc_s
  • 704,970
  • 168
  • 1,303
  • 1,425
timothy
  • 17
  • 3
  • 3
    You need to specify the comma as the separator when reading in your csv file. – deschen Nov 11 '20 at 13:12
  • In order for us to help you, please provide a [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). For example, to produce a minimal data set, you can use `head()`, `subset()`, or the indices. Then use `dput()` to give us something that can be put in R immediately. Also, please make sure you know what to do [when someone answers your question](https://stackoverflow.com/help/someone-answers). More info can be found at Stack Overflow's [help center](https://stackoverflow.com/help). Thank you! – iamericfletcher Nov 11 '20 at 13:14
  • 1
    As a quick work-around you may be able to read the file into Excel and just use the Text to Columns wizard on the Data ribbon. – SteveM Nov 11 '20 at 13:25

0 Answers0