ast on my client) posting.
--
David.
From: jim holtman [mailto:jholt...@gmail.com]
Sent: Wednesday, April 28, 2010 1:31 PM
To: arnaud Gaboury
Cc: r-help@r-project.org
Subject: Re: [R] gsub,regex and replacing
Next time you include a data frame that has spaces in the fields,
please
consider
, -1082, 11084, 1983.5,
-2464, -118), quantity = c(0, -3, 8, 2, -1, 0)), .Names = c("DESCRIPTION",
"prix", "quantity"), row.names = c(NA, -6L), class = "data.frame")
From: jim holtman [mailto:jholt...@gmail.com]
Sent: Wednesday, April 28, 2010 1:31
Next time you include a data frame that has spaces in the fields, please
consider using 'dput' to provided the data. It is hard to read in
otherwise.
Will this do it:
> x <- read.table(textConnection(" DESCRIPTIONprix
quantity
+ 1 'CORN Jul/10'-1.5
Dear group,
I need to modify some characters in a data frame. I want to use gsub and the
regex functionalities to do this.
Here is the data frame (df):
DESCRIPTIONprix quantity
1 CORN Jul/10-1.50
2 CORN May/10 -1082.0
4 matches
Mail list logo