I have a dataframe with two rows. In the first row I have all the headers which are repeating: "estimate1", "estimate2", "statistic", "value", "low", "high", "method", "alternative". In the second row I have all the values which are always different. Now I want to put it in a dataframe with 8 columns where all the values go underneath similiar column names. So I want to merge
the values from the columns with the same names and collect all the values from left to right and put them into one column. I hope that makes sens. I tried a bunch of stuff from further posts here but it didn't work out. Thanks so much!! Best!
how the dataframe looks like (just an example of it in shorter):
structure(list(estimate1 = 0.714007764032839, estimate2 = 0.73845425164382,
statistic = -1.40159874057185, value = 0.161035103302344,
low = -0.0586319030790906, high = 0.00973892785712839, method = "DeLong's test for two correlated ROC curves",
alternative = "two.sided", estimate1 = 0.714007764032839,
estimate2 = 0.800820052750845, statistic = -6.74113868776472,
value = 1.57150111460365e-11, low = -0.112052677201869, high = -0.0615719002341422,
method = "DeLong's test for two correlated ROC curves", alternative = "two.sided",
estimate1 = 0.73845425164382, estimate2 = 0.800820052750845,
statistic = -8.74919112196137, value = 2.14887453642886e-18,
low = -0.0763367753757128, high = -0.0483948268383366, method = "DeLong's test for two correlated ROC curves",
alternative = "two.sided", estimate1 = 0.714007764032839,
estimate2 = 0.798989561276422, statistic = -5.95819444516776,
value = 2.55039957819806e-09, low = -0.112936786539709, high = -0.0570268079474558,
method = "DeLong's test for two correlated ROC curves", alternative = "two.sided",
estimate1 = 0.73845425164382, estimate2 = 0.798989561276422,
statistic = -8.28057748735473, value = 1.22579375899045e-16,
low = -0.0748636613513149, high = -0.046206957913888, method = "DeLong's test for two correlated ROC curves")