Re: [R] grup function

2013-04-10 Thread arun
ghai"    "Hello here i am" "hallo" But, this will  not work here: word2<-c("Shangh i", "B lanced food","h llo") A.K. - Original Message - From: Dominic Roye To: R help Cc: Sent: Wednesday, April 10, 2013 6:58 AM

Re: [R] grup function

2013-04-10 Thread Bert Gunter
Below. On Wed, Apr 10, 2013 at 3:58 AM, Dominic Roye wrote: > Hello, > > How can i mattch blanks within words, when i have more phrases? > > c("Shangh i", "Hello here i am","h llo") > > >> gsub(" ","a",c("Shangh i", "Hello here i am","h llo")) > [1] "Shanghai""Helloahereaiaam" "hallo" > >

[R] grup function

2013-04-10 Thread Dominic Roye
Hello, How can i mattch blanks within words, when i have more phrases? c("Shangh i", "Hello here i am","h llo") > gsub(" ","a",c("Shangh i", "Hello here i am","h llo")) [1] "Shanghai""Helloahereaiaam" "hallo" I would like to have [1] "Shanghai" "Hello here i am" "hallo" I hope someo