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 lose my first column class, so I 
thought I could combine it like so:

dataframe <- cbind(dataframe$label, binarize(dataframe[,-1]))

but then I lose my header (names).............how can I do the above operation 
and keep my header in tact?

Basically i just want to binarize everything but the first column (since its a 
factor column and not numeric).

Thank you for any help you can give me, I am relatively new to R.

Brian

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to