I am a green hand for using R-based software to analyze my data, which are all saved in csv format. My question is well described in the title of this post. Of course, it is also welcome absolutely if you can provide solutions using different methods. Your prompt response will be highly appreciated.
Best regards,
Jeff
Actually I tested the codes that I got from help pages of gplots. But I failed to get image even with a small testing file. The following is my testing file saved as try.csv.
Gene,BB8,BB12,BB28,BB55,BB70,BB106,Pool_B
Du123.6_C_SA,207,352,165,84,147,198,182
Du151.2_C_SA,196,1555,2529,818,241,487,518
Du156.12*_C_SA,369,390,238,336,406,258,231
Du172.17*_C_SA,429,884,499,196,549.550.315
The codes I used are:
>library(gplots)
>data<-read.table("try.csv", header=T)
>heatmap.2(as.matrix(data))
After running the heatmap.2 function, I got error message which is:
Error in heatmap.2(as.matrix(data)) : `x' must be a numeric matrix
Is there any problem with my testing file?
Thanks for your considerations in advance.
Jeff
I hope declaring the rownames() would help
Check if your imported data contains numeric columns: sapply(data, class)