Re: [R] Using cbind to combine data frames and preserve header/names

2012-11-17 Thread Brian Feeny
David and Rainer, Thank you both for your responses, you got me on track, I ended up just doing like so: trainset <- read.csv('train.csv',head=TRUE) trainset[,-1] <- binarize(trainset[,-1]) trainset$label <- as.factor(trainset$label) I appreciate your help Brian On Nov 17, 2012, at 11:25 AM

Re: [R] Using cbind to combine data frames and preserve header/names

2012-11-17 Thread David Winsemius
On Nov 16, 2012, at 9:39 PM, Brian Feeny wrote: I have a dataframe that has a header like so: class value1 value2 value3 class is a factor the actual values in the columns value1, value2 and value3 are 0-255, I wish to binarize these using biclust. I can do this like so: binarize(dat

Re: [R] Using cbind to combine data frames and preserve header/names

2012-11-16 Thread Rainer Schuermann
Not sure where the problem is? Since you did not provide sample data, I took the iris data set and converted it to your structure: x <- cbind( iris[5], iris[1:3] ) head( x ) Species Sepal.Length Sepal.Width Petal.Length 1 setosa 5.1 3.5 1.4 2 setosa 4.9

[R] Using cbind to combine data frames and preserve header/names

2012-11-16 Thread Brian Feeny
I have a dataframe that has a header like so: class value1 value2 value3 class is a factor the actual values in the columns value1, value2 and value3 are 0-255, I wish to binarize these using biclust. I can do this like so: binarize(dataframe[,-1]) this will return a dataframe, but then I