Hi
One more comment
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of David Winsemius
> Sent: Thursday, August 23, 2012 2:22 AM
> To: Paula Cafeld
> Cc: r-help@r-project.org
> Subject: Re: [R] gsub -&
On Aug 22, 2012, at 10:24 AM, Paula Cafeld wrote:
Hi all,
please excuse- I'm a complete newbie to R, so it's possible my
question was asked a thousand times before, but I don't get it :-(
I imported a CSV file via:
x=read.csv("test.csv",header=TRUE,sep="\t")
In a column there are values w
r-help@r-project.org"
Cc:
Sent: Wednesday, August 22, 2012 1:24 PM
Subject: [R] gsub -> replace substring in column
Hi all,
please excuse- I'm a complete newbie to R, so it's possible my question was
asked a thousand times before, but I don't get it :-(
I imported a CSV
This is untested, but I suspect you should try
x[[9]]
instead of
x[9]
If you want to replace the original values with the modified values, then
you will need something like,
x[[9]] <- gsub(".",",",x[[9]],fixed=T)
The difference between single brackets [] and double brackets [[]] is
importa
Hello,
Your earch pattern is wrong, it should be
gsub("\\.", ", ", x[9])
I find x[9] a bit strange, by the way. Specially if the column vector
name is V16. Anyway, try the instruction above and if it doesn't work,
post a data example with
dput( head(x, 16) ) # paste the output of this in
Hi all,
please excuse- I'm a complete newbie to R, so it's possible my question was
asked a thousand times before, but I don't get it :-(
I imported a CSV file via:
x=read.csv("test.csv",header=TRUE,sep="\t")
In a column there are values with the dot-character (".") I want to replace
with a co
6 matches
Mail list logo