mercredi 5 juillet 2017

Produce vector of TRUE grepl variables

I have this dataset: http://ift.tt/2srzjXU

I want to make a new vector called Method. This will consist of the values No-till, Non-irrigated or Irrigated. I can extract these from group Group column.

I'm thinking an ifelse() function combined with grepl() or strsplit() might work?

Thanks.

Aucun commentaire:

Enregistrer un commentaire