df <- 
 SUB    CONC    
  1     baseline (predose)
  2     screen 
  2     predose
I want to add a flag such that if CONC column has "predose" written in it regardless of other things in the cell, then give it a flag 1, otherwise 0.
   dfout <- 
 SUB    CONC                  PREDOSE  
  1     baseline (predose)     1 
  2     screen                 0
  2     predose                1
How can I do this in R? I used RStudio.
 
    