Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

I want to turn column names into an identifying column in R

$
0
0

Hey guys I'm pretty new to R so apologies if this is a dumb question. I have a data frame that looks like this:

Gelatin Geltrex Combo Control
1   0.761   0.732 0.557   0.723
2   0.704   0.712 0.764   0.540
3   0.580   0.435 0.351   0.537

I want to end up with 2 columns; one with the numbers in the row and another column with the current column names as identifiers for the numbers?


Viewing all articles
Browse latest Browse all 201839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>