if your data is in data.frame df:
> ifelse(!grepl('mutiny of' , df$actor) & grepl('military forces of',df$actor) & apply(df,1,function(x) grepl(x[2],x[1])),1,0) [1] 1 0 0 0
grepl returns a logical vector, and this can be assigned to anyone, for example. df$actor_type .
violation of this application:
!grepl('mutiny of', df$actor) and grepl('military forces of', df$actor) satisfy your first two requirements. the last fragment of apply(df,1,function(x) grepl(x[2],x[1])) goes along the lines and greps for the country in the actor.
source share