TY for the two answers. Both work.
> -Original Message-
> From: Phil Spector [mailto:spec...@stat.berkeley.edu]
> Sent: Tuesday, May 11, 2010 11:21 AM
> To: arnaud Gaboury
> Cc: r-help@r-project.org
> Subject: Re: [R] Regex and gsub
>
> df3$DESCRIPTION =
>
df3$DESCRIPTION =
sub(' [a-z]{3}/[0-9]{2}','',df3$DESCRIPTION,ignore.case=TRUE)
- Phil Spector
Statistical Computing Facility
Department of Statistics
Am 11.05.2010 10:37, schrieb arnaud Gaboury:
> Dear group,
>
> Here is my df :
>
> df3 <-
> structure(list(DESCRIPTION = c("COPPER May/10", "COTTON NO.2 Jul/10",
> "CRUDE OIL miNY May/10", "GOLD Jun/10", "ROBUSTA COFFEE (10) Jul/10",
> "SOYBEANS Jul/10", "SUGAR NO.11 Jul/10", "SUGAR NO.11 May/1
Dear group,
Here is my df :
df3 <-
structure(list(DESCRIPTION = c("COPPER May/10", "COTTON NO.2 Jul/10",
"CRUDE OIL miNY May/10", "GOLD Jun/10", "ROBUSTA COFFEE (10) Jul/10",
"SOYBEANS Jul/10", "SUGAR NO.11 Jul/10", "SUGAR NO.11 May/10",
"WHEAT Jul/10", "SPCL HIGH GRADE ZINC USD", "STANDARD LE
4 matches
Mail list logo