Dataset reshape and create new columns
Show older comments
Hello all,
I am have problems with dataset reshaping and wrangling. I have a file with dataset in the form as shown in the example data attached, every 4 columns are in one group, the first row is the sample ID, and the second row contains the information of the variables. I am wondering whether there are any ways to concatenate all the groups vertically, and create new column names with the information from the sample ID (specifically, text before underscore as "SampleType", and that after the underscore as "replicateID"). In the end the output dataset should have the original 4 columns and the newly added two columns.
Thank you very much for the help!
Accepted Answer
More Answers (0)
Categories
Find more on Managing Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!