I have a data frame of proteins with their localization that looks like this:
Protein_loc <- data.frame(
Pro_ID = c("Palid", "Tars", "Palid", "Eef2", "Actn1", "Tars"),
Loc = c("Actin cyto", "Actin cyto", "Axon", "Aggresome", "Cell junc", "Cell junc"))
And, I would like to merge and concatenate it into a data frame that looks like this:
Subcell_loc <- data.frame(
Loc = c("Actin cyto", "Axon", "Aggresome", "Cell junc"),
Pro_ID = c("Palid, Tars", "Palid", "Eef2", "Actn1, Tars"))
I can do this in Excel rather easily with the concatenate function, but I can't find a way to do this in R.
Any help would be much appreciated, thanks.