Perfect. Thank you so much.
Regards, Farnoosh Sheikhi
On Thursday, February 13, 2014 2:16 PM, arun <smartpink111@yahoo.com>
wrote:
Hi Farnoosh,
If I understand it correctly,
dat <-read.table(text="Var1
Great>5
great
'less great<2'
'approx
great11'",sep="",header=TRUE,stringsAsFactors=FALSE)
dat$Var1 <-
gsub(".*(great).*","\\L\\1",dat$Var1,ignore.case=TRUE,perl=TRUE)
dat$Var1
#[1] "great" "great" "great" "great"
A.K.
On Thursday, February 13, 2014 5:04 PM, farnoosh sheikhi
<farnoosh_81@yahoo.com> wrote:
Hi Arun,
One more questions, I have a column which is a character column like below. I
want to replace these values to a unique value like great.
How do I do that?
Thanks.
Var1
Great>5
great
less great<2
approx great11
Regards, Farnoosh Sheikhi
[[alternative HTML version deleted]]