I have some data from a FACS (fluorescent activated cell sorting) experiment that I want to analyze using R. The problem is that the FACS software has a weird output and basically puts all the characteristics in one column with a "-" in between them.
Example:
clone 9_+b_004.fcs/Single cells/red vs. green
clone 9_+T_004.fcs/Single cells/red vs. green
clone 10_+b_004.fcs/Single cells/red vs. green
and so on
What I need for my analysis are new columns. For example a column named "Clone" with a variable "clone 9" if there is clone 9 in the original column, or "clone 10" if there is clone 10 in the original column. And also a column "Added compound" with variables such as "TGFb" if there's "+b" in the original column, and "Tamoxifen" if there is "+T" etc...
The problem is that I have no idea how to create those columns. I've tried several different codes and combinations (grepl, replace, mutate, to name a few) but nothing has worked so far. Because I need multiple new columns, I can't just replace the original column without duplicating.
Any help or ideas are much appreciated.