[R] substring simultaneous conditions

Rosa Oliveira rosita21 at gmail.com
Mon Sep 5 13:51:33 CEST 2016

Dear all,

I have searched all over and didn´t found an answer :( Sorry, I'm new.

I need urgently to "not analyse"the weight the ID's that have 07 in the
position 3 and 4 respectively, 01 or 11 in positions 11 and 12 of ID
variable. .

I used the following code:


But, instead of removing just the id's that respect the 3 conditions
simultaneously, base don't have all the id's that have 03 in the 3 and 4
positions os id variable, neither 01  in positions 11 and 12 of ID, neither 11
in positions 11 and 12 of ID variable.variable.

So, it seems, that the code exclude all the conditions, as it was a OR (|)
condition in spite of AND (&) condition.

Can anyone help me please?

I attach the data.

Rosa Oliveira


Antes de imprimir este e-mail pense bem se tem mesmo que o fazer.
Há cada vez menos árvores.
Não imprima, pense na sua responsabilidade e compromisso com o MEIO

More information about the R-help mailing list