Re: [R] Manipulate strings reordering some elements

2012-03-13 Thread Igor Sosa Mayor
Berend: 1. 1000 thanks for your help. It works perfectly 2. many thanks for the analysis of the expression; i will try to understand it. Perl is really not easy to read thanks again! On Tue, Mar 13, 2012 at 11:51:49AM +0100, Berend Hasselman wrote: > > On 13-03-2012, at 11:28, Igor Sosa Mayor w

Re: [R] Manipulate strings reordering some elements

2012-03-13 Thread Berend Hasselman
On 13-03-2012, at 11:28, Igor Sosa Mayor wrote: > many thanks, Berend. > > It works well... but with a problem because i was not completely clear > in my first email. > > It works with cases such as: > Franco (El) > Regueras (Las) > > but not with other cases such as: > Fauces de San Andrés (L

Re: [R] Manipulate strings reordering some elements

2012-03-13 Thread Igor Sosa Mayor
many thanks, Berend. It works well... but with a problem because i was not completely clear in my first email. It works with cases such as: Franco (El) Regueras (Las) but not with other cases such as: Fauces de San Andrés (Las) any hints? or meaybe if it is very complicated, any short explanati

Re: [R] Manipulate strings reordering some elements

2012-03-13 Thread Berend Hasselman
On 13-03-2012, at 10:42, Igor Sosa Mayor wrote: > Hi R-Users, > > I want to manipulate some strings in the following way. I have the > following vector with spanish municipalities: > > municipios<-c("Allande", "Aller", "Amieva", "Avilés", "Belmonte de > Miranda", > "Degaña", "Franco (El)", "Gi

Re: [R] Manipulate strings reordering some elements

2012-03-13 Thread Igor Sosa Mayor
I have to add some clarification: there are ONLY 4 articles (el,la,los,las) and the structure is always the same: NAMEOFMUNICIPALITY (El) NAMEOFMUNICIPALITY (La) etc. On Tue, Mar 13, 2012 at 10:42:54AM +0100, Igor Sosa Mayor wrote: > Hi R-Users, > > I want to manipulate some strings in the foll

[R] Manipulate strings reordering some elements

2012-03-13 Thread Igor Sosa Mayor
Hi R-Users, I want to manipulate some strings in the following way. I have the following vector with spanish municipalities: municipios<-c("Allande", "Aller", "Amieva", "Avilés", "Belmonte de Miranda", "Degaña", "Franco (El)", "Gijón", "Gozón", "Grado", "Grandas de Salime", "Quirós", "Regueras