Re: [R] map two names into one

2012-11-08 Thread Tammy Ma
Thanks. Yes. Your approach can identify: Glaxy ace S 5830 and S 5830 Glaxy ace But you can not identify using same program: Iphone 4S 16 G Iphone 4S 16G How should I solve both in same time. Kind regards,Tammy [[alternative

Re: [R] map two names into one

2012-11-08 Thread arun
Ma metal_lical...@live.com To: smartpink...@yahoo.com; r-help@r-project.org r-help@r-project.org Sent: Thursday, November 8, 2012 8:12 AM Subject: Re: [R] map two names into one Thanks. Yes. Your approach can identify: Glaxy ace S 5830  and S 5830 Glaxy ace But you can not identify using same

Re: [R] map two names into one

2012-11-08 Thread arun
. From: Tammy Ma metal_lical...@live.com To: smartpink...@yahoo.com; r-help@r-project.org r-help@r-project.org Sent: Thursday, November 8, 2012 8:12 AM Subject: Re: [R] map two names into one Thanks. Yes. Your approach can identify: Glaxy ace S 5830  and S 5830 Glaxy ace But you can

Re: [R] map two names into one

2012-11-08 Thread arun
To: smartpink...@yahoo.com; r-help@r-project.org r-help@r-project.org Sent: Thursday, November 8, 2012 8:12 AM Subject: Re: [R] map two names into one Thanks. Yes. Your approach can identify: Glaxy ace S 5830  and S 5830 Glaxy ace But you can not identify using same program: Iphone 4S 16 G

Re: [R] map two names into one

2012-11-08 Thread arun
-help@r-project.org Sent: Thursday, November 8, 2012 8:12 AM Subject: Re: [R] map two names into one Thanks. Yes. Your approach can identify: Glaxy ace S 5830  and S 5830 Glaxy ace But you can not identify using same program: Iphone 4S 16 G Iphone 4S 16G How should I solve both in same time

Re: [R] map two names into one

2012-11-08 Thread arun
: Thursday, November 8, 2012 8:12 AM Subject: Re: [R] map two names into one Thanks. Yes. Your approach can identify: Glaxy ace S 5830  and S 5830 Glaxy ace But you can not identify using same program: Iphone 4S 16 G Iphone 4S 16G How should I solve both in same time. Kind regards, Tammy

[R] map two names into one

2012-09-26 Thread Tammy Ma
Dear R user: I have got the following problem: I have imported two data sets into R: one set includes price information, another one includes volume information. but I noticed the wrong data order problem in the product name, for instance, in one data set, GALAXY ACE S 5830 in another

Re: [R] map two names into one

2012-09-26 Thread Kenn Konstabel
It may be easy or difficult depending on what your data are like. GALAXY ACE S 5830 vs S 5830 GALAXY ACE One easy and reasonably general way would be to divide each such bit into 4 words and then compare if set 2 contains exactly all words in set 1 but possibly in different order. x1 - GALAXY

Re: [R] map two names into one

2012-09-26 Thread Sarah Goslee
Hi Tammy, I think we need more information. Are the names always four parts? Does the fix always involve moving two parts from the back to the front? For that matter, which of the two you gave is correct? Or does it matter what order the parts are in as long as it's consistent? Sorting them

Re: [R] map two names into one

2012-09-26 Thread arun
 vec33-paste(sort(unlist(strsplit(vec3, ))),collapse=_)  identical(vec11,vec33) #[1] FALSE A.K. - Original Message - From: Tammy Ma metal_lical...@live.com To: r-help@r-project.org r-help@r-project.org Cc: Sent: Wednesday, September 26, 2012 5:04 AM Subject: [R] map two names into one Dear R