lundi 7 septembre 2015

r remove a word if statement is true

I have a column with unstructured free text data in each row.

  Col1
  --------------
  No
  No
  No, The weather is sunny
  No
  No, The weather is windy

I am trying to remove No if there is any other sentence in the same line. For example remove No if the cell contains another sentence or words like The Weather. The final output should look like this.

   Col1
  --------------
  No
  No
  The weather is sunny
  No
  The weather is windy

Any help on how to do this is much appropriated folks.

Aucun commentaire:

Enregistrer un commentaire