In my data set I have an Object that, in addition to a large data frame has a seperate section of meta data where additional information is stored about each column of the data set.
The graphing function I am working with will only accept the data frame matrix and not the object, so I simply extract it using as.data.frame and this works fine.
However there is a section of the meta data that I would like to add to the actual data matrix and use for identification and annotation within this graphing function.
I have tried almost every conceivable way to append this data to the extracted data.frame, and in doing so, I always get the error:
Error in heatmap(dataset) : 'x' must be a numeric matrix
The column of meta data I have is simple integers. I extract it out using as.data.frame or as.matrix. I append it using cbind, I check the type, the class, everything and its fine. I will even rerun as.matrix or as.data.frame back through to make sure everything is a numeric matrix, and I still get this error.
I have tried using cbind.data.frame also and this doesn't work I still get this error.
Does anyone know why, or I would also be happy to provide additinal examples and code if you think it would helpful.
The function by the way is called heatmap.2
Thanks so much for any advice