This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to split two rows in multiples row in R

I have a dataset like this (1st) and I want to turn him into this format (2st)!

1st

2st

row dataset split r col

Where are you getting the values for column1 in the output df from?

sorry for the lack of information, but basically there are several files (each with the name in column 1) that I joined in a file only through "list.files()". the second image I made manually by excel, but this is not good, because later I will have many more files to join and format in a dataframe.

I started my first contact with bioinformatics in biology graduation, so I have no experience

Please show us your full code, starting from the list.files() command.

1 answer

What you are looking for is probably:

 b <- matrix(a, ncol=8, byrow = TRUE)

Then rename column names and transform to data.frame if you wish.

Log in to answer this question.