I have a data.frame with this structure;
df1 <- data.frame(
gene = c("Gen1", "Gen2;Gen3", "Gen4"),
freq = c(7, 21 , 51))
I would like some way to split Gene2 and Gene3 but keeping their frecuency value so the final result can look like df2
df2 <- data.frame(
gene = c("Gen1", "Gen2", "Gen3", "Gen4"),
freq = c(7, 21, 21 , 51))