search for: newdatatest

Displaying 1 result from an estimated 1 matches for "newdatatest".

Did you mean: newdataset
2010 Jun 25
2
Assigning variable value as name to cbind column
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 using the value of the variable 'name' as