I have a file that has 52560 row but only one column with different header names in the one row, so I need to separate that rows with their own values and columns. So the data frame has 52560 X 1 but I need 52560 X 19 (headings). I tried separate and split functions but that did not work. I am new with R programming.
Asked
Active
Viewed 281 times
0
-
Fix it by reading it in the right way from the start. Show the raw file and the command you are using to load the data and we can help you import it correctly the first time. – Gregor Thomas Oct 28 '18 at 18:01
-
Also, please never post "pictures" of data. People who want to help you want to demonstrate the answer on your data, and your image can't be copy/pasted. It's much better to use `dput` on a subset of your data, or share code to simulate fake data, or just provide a few lines of the file. See [more tips on sharing reproducible R examples here](https://stackoverflow.com/q/5963269/903061). – Gregor Thomas Oct 28 '18 at 18:03
1 Answers
0
I think the values are separated by ';' . Hence create a list of 9 column headers. Read this file in R with separation ';' while assigning header to the columns.

Yogesh
- 1,384
- 1
- 12
- 16