in the attached picture you can see two dataframes. I want to transform the first dataframe to the second one. I feel like there is probably an easy solution, I just don't know it.
Note that this example is created in Excel, the "real work" will be done in R.
You need pivot_longer
.
library(tidyr)
df %>%
pivot_longer(cols=starts_with("Gene"), names_to="Gene", values_to="Count")