1
222
33 NA
?
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Ralf B
Sent: Friday, 25 June 2010 3:48 PM
To: r-help@r-project.org
Subject: [R] Assigning variable value as name to cbind column
Hi all,
I have
Try this also:
cbind(dataTest, `colnames-`(cbind(new.data[1:nrow(dataTest)]), name))
On Fri, Jun 25, 2010 at 2:47 AM, Ralf B ralf.bie...@gmail.com wrote:
Hi all,
I have this (non-working) script:
dataTest - data.frame(col1=c(1,2,3))
new.data - c(1,2)
name - test
n.row - dim(dataTest)[1]
Hi all,
I have this (non-working) script:
dataTest - data.frame(col1=c(1,2,3))
new.data - c(1,2)
name - test
n.row - dim(dataTest)[1]
length(new.data) - n.row
names(new.data) - name
cbind(dataTest, name=new.data)
print(dataTest)
and would like to bind the new column 'new.data' to 'dataTest' by
3 matches
Mail list logo