Hi everyone, I have a certain number of samples and I want to visualize the groups those samples belong to. For example, suppose to have three variables, age, sex, and smoker/nonsmoker, and three samples, S1, S2, S3. S1 is 35, male, nonsmoker S2 is 24, female, nonsmoker S3 is 24, female, smoker
at the end I have the following data frame: S1 S2 S3 age 35 24 30 sex M F F smk N N S What I would like is to see this represented in a matrix with colors representing the group the specific sample belongs to. In the example, Age would have three levels, sex and smoker/nonsmoker will have two. An example of what I would like to obtain is from the attached image (from The Cancer Genome Browser at UCSC) You can see the class of each sample represented by the color. Clearly here there are useless variables, like sample name, but the example gives an idea of what I would like to get. So far I was able to achieve a pseudo-result with colorbar.plot, but I find it hard to get the labels in the correct position, as it seems like I cannot find a way to automatically put them near each class bar Any suggestions other than colorbar.plot? ______________________________________________ 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.