I have received a dataset in a .csv table. The first three lines of the table looks like this:
Species,Methods
Chlamydomonas pisiformis; Stichococcus bacillaris; Stichococcus subtilis; Pleurococcus vulgaris; Scenedesmus sp.; Kirchneriella sp.; Chlorococcum humicola; Protosiphon botryoides; Stigeoclonium tenue; Oedogonium sp.; Vaucheria sp.; Conjugales; Botrydium granulatum; Botrydiopsis sp.; ,Micropicking; Subculturing
Eutreptiella gymnastica; Cryptomonas sp; Rhodomonas sp ,Phototaxis
Symbiodinium sp.,Amoebic digestion
Here, the names of multiple species are stored in a single cell separated by semicolons. I want to modify this so that the final output.csv looks something like:
Species,Methods
Chlamydomonas pisiformis,Micropicking; Subculturing
Stichococcus bacillaris,Micropicking; Subculturing
Stichococcus subtilis,Micropicking; Subculturing
Pleurococcus vulgaris,Micropicking; Subculturing
Scenedesmus sp.,Micropicking; Subculturing
Kirchneriella sp.,Micropicking; Subculturing
Chlorococcum humicola,Micropicking; Subculturing
Protosiphon botryoides,Micropicking; Subculturing
Stigeoclonium tenue,Micropicking; Subculturing
Oedogonium sp.,Micropicking; Subculturing
Vaucheria sp.,Micropicking; Subculturing
Conjugales,Micropicking; Subculturing
Botrydium granulatum,Micropicking; Subculturing
Botrydiopsis sp.,Micropicking; Subculturing
Eutreptiella gymnastica,Phototaxis
Cryptomonas sp,Phototaxis
Rhodomonas sp ,Phototaxis
Symbiodinium sp.,Amoebic digestion
The elements of the Species column that are separated by a semicolon (;) need to be in individual rows, while the corresponding Methods are simply repeated for each species in the adjacent column.
Is it possible to do this in R, preferably in a tidyverse compatible manner?