Re: [R] Handling character string

2010-06-12 Thread jim holtman
uot;^" or "*" or "+$"? > > Thanks for your time. > > --- On *Sat, 6/12/10, jim holtman * wrote: > > > From: jim holtman > > Subject: Re: [R] Handling character string > To: "Megh Dal" > Cc: "Erik Iverson" , r-h...@stat.ma

Re: [R] Handling character string

2010-06-12 Thread Megh Dal
f it is at the last position. I have tried with > different combinations like "sub('[[:space:]]-$', '', str)", > "sub('$+[[:space:]]+$', '', str)" etc, none is working if space is at the 1st > position. > What would be the

Re: [R] Handling character string

2010-06-12 Thread jim holtman
$', '', str)" etc, none is working if space is at the 1st > position. > What would be the correct approach? > Thanks, > --- On Sat, 6/12/10, Erik Iverson wrote: > > From: Erik Iverson > Subject: Re: [R] Handling character string > To: "Megh Dal" >

Re: [R] Handling character string

2010-06-12 Thread Megh Dal
'', str)" etc, none is working if space is at the 1st position. What would be the correct approach? Thanks, --- On Sat, 6/12/10, Erik Iverson wrote: From: Erik Iverson Subject: Re: [R] Handling character string To: "Megh Dal" Cc: r-h...@stat.math.ethz.ch Date: Saturday, June

Re: [R] Handling character string

2010-06-11 Thread Bert Gunter
Subject: Re: [R] Handling character string Megh Dal wrote: > Dear all, Is there any R function to say these 2 character strings > "temp" and " temp" are actually same? If I type following code R > says there are indeed different : >> "temp" == " temp&

Re: [R] Handling character string

2010-06-11 Thread Erik Iverson
Megh Dal wrote: Dear all, Is there any R function to say these 2 character strings "temp" and " temp" are actually same? If I type following code R says there are indeed different : "temp" == " temp"[1] FALSE You don't say how you're defining "same", but it definitely requires more explan