On 29/12/2009 1:16 PM, Lisa wrote:
Dear All,
I am not sure how to remove double quotation marks in a string, e.g.,
paste(variable, 1). Can anybody please help me solve it? Thank you in
advance.
I think you need to tell us what is wrong with what you get from that.
When I look at the result:
Thank you for your reply. But in the following case, “cat()” or “print()”
doesn’t work.
data.frame(cbind(variable 1, variable 2, cat(paste(variable, x), \n))),
where x is a random number generated by other R script.
Lisa
Duncan Murdoch wrote:
On 29/12/2009 1:16 PM, Lisa wrote:
Dear All,
On Tue, Dec 29, 2009 at 6:31 PM, Lisa lisa...@gmail.com wrote:
Thank you for your reply. But in the following case, “cat()” or “print()”
doesn’t work.
data.frame(cbind(variable 1, variable 2, cat(paste(variable, x), \n))),
where x is a random number generated by other R script.
Lisa
Yes,
?get
something like:
v1 - c(0, 1, 0)
v2 - c(1, 1, 0)
v3 - c(2, 1, 2)
v4 - c(2, 2, 1)
v5 - c(0, 1, 1)
x - 5
cbind(v1, v2, get(paste('v', x, sep='')))
v1 v2
[1,] 0 1 0
[2,] 1 1 1
[3,] 0 0 1
On Tue, Dec 29, 2009 at 3:54 PM, Lisa lisa...@gmail.com wrote:
Thank you for your
Thanks. I also need column name v5.
Lisa
jholtman wrote:
?get
something like:
v1 - c(0, 1, 0)
v2 - c(1, 1, 0)
v3 - c(2, 1, 2)
v4 - c(2, 2, 1)
v5 - c(0, 1, 1)
x - 5
cbind(v1, v2, get(paste('v', x, sep='')))
v1 v2
[1,] 0 1 0
[2,] 1 1 1
[3,] 0 0 1
On Tue, Dec
To: r-help@r-project.org
Subject: Re: [R] Remove double quotation marks
Thank you for your help. But here I just want to combine some vectors by
column based on the numbers determined by other R script.
For example, I have five vectors:
v1 - c(0, 1, 0)
v2 - c(1, 1, 0)
v3 - c(2, 1, 2)
v4 - c(2
-project.org [mailto:r-help-boun...@r-project.org]
On Behalf Of Lisa
Sent: Tuesday, December 29, 2009 3:55 PM
To: r-help@r-project.org
Subject: Re: [R] Remove double quotation marks
Thank you for your help. But here I just want to combine some vectors by
column based on the numbers determined
7 matches
Mail list logo