I would like to organize my data as follows: I have a table that contains various data, and the numbers represent a level of similarity between these data, eg RF00013 has 100% similarity with the data RF00014. I would leave my table as a heatmap where darker colors represent higher similarity, and the lighter colors represent less level of similarity. I'm using version 2.11 of R. these are the data from my file: http://r.789695.n4.nabble.com/file/n4619084/Captura_de_tela-11.png this is that I generate the heat map: http://r.789695.n4.nabble.com/file/n4619084/Captura_de_tela-12.png But the colors are wrong, you have data with 100% clear, and has data with 100% shade, I would like to mount a heatmap as described above. Besides wondering how do I get the data to appear in heatmap in the same way that file, line and column. -- View this message in context: http://r.789695.n4.nabble.com/Matrix-heatmap-tp4619084.html Sent from the R help mailing list archive at Nabble.com.
Hello, Please read the posting guide, like this it's difficult for us to give a sensible an answer. In particular, 1. Use R syntax, your "table" seems to be a "matrix" or "data.frame". Which is it? 2. Post your data using dput(). Just copy it's output and paste it in here, then, we'll beble to copy&paste in an R session and get an exct copy of your data. (Impossible to do with what you've posted.) 3. A code example would be nice. Now, it seems that heat.colours() or similar function could do what you want. If you can do with shades of grey, grey() or gray(). (I would try heat.colors first, then see if something else is needed.) Hope this helps, Rui Barradas -- View this message in context: http://r.789695.n4.nabble.com/Matrix-heatmap-tp4619084p4619143.html Sent from the R help mailing list archive at Nabble.com.
I used only these three command lines in R>arq <-read.table("file") > arq_matrix <-data.matrix(arq) > arq_heatmap <- heatmap(arq_matrix, Rowv = NA, Colv = NA,col = cm.colors > (256), scale = "column", margins =c(5,10))Excuse me if poorly written, because I'm Brazilian -- View this message in context: http://r.789695.n4.nabble.com/Matrix-heatmap-tp4619084p4619160.html Sent from the R help mailing list archive at Nabble.com.
>arq <-read.table("file") > arq_matrix <-data.matrix(arq) >dput(arq) > arq_heatmap <- heatmap(arq_matrix, Rowv = NA, Colv = NA,col = heat.colors > (256), scale = "column", margins =c(5,10))dput done with this command, but still gave the same .. I do it before generating the heatmap? would be this way? -- View this message in context: http://r.789695.n4.nabble.com/Matrix-heatmap-tp4619084p4619284.html Sent from the R help mailing list archive at Nabble.com.
this would be the same, like, I need color higher for larger numbers, type, variations of 5 om 5, for example, 0 is white, a little darker 1-5, 6-10 darker still, and so on ... -- View this message in context: http://r.789695.n4.nabble.com/Matrix-heatmap-tp4619084p4619334.html Sent from the R help mailing list archive at Nabble.com.
Hi> > >arq <-read.table("file") > > arq_matrix <-data.matrix(arq)Are you sure that arg_matrix is numeric? Did you check it somehow?> >dput(arq)You forgot to include dput(arg) result. Without that only you know what arg is.> > arq_heatmap <- heatmap(arq_matrix, Rowv = NA, Colv = NA,col =heat.colors> > (256), scale = "column", margins =c(5,10)) > > dput done with this command, but still gave the same .. > > I do it before generating the heatmap? > > would be this way?Which way? Regards Petr> > -- > View this message in context: http://r.789695.n4.nabble.com/Matrix- > heatmap-tp4619084p4619284.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.
I would leave my table as a heatmap where darker colors represent higher similarity, and the lighter colors represent less level of similarity. I'm using version 2.11 of R. I once used this code, maybe it will help you: #dendogram plot(dendro15, labels = cellType) ### I first made a dendrogram of my data #heatmap specifications # Filter genes on variance otherwise the heatmap cannot be shown. em <- exprs(ALL)[which(apply(exprs(ALL), 1, sd) > 1.75), ] #### I had so many genes I had to filter them pal <- maPalette(low="blue", high="yellow", mid=NULL, k=25) #### You can make a color palet here to specify ## the light and dark colors. ### Heatmap heatmap(em, Colv=as.dendrogram(dendro15), col=pal, labCol=cellType) -- View this message in context: http://r.789695.n4.nabble.com/Matrix-heatmap-tp4619084p4619683.html Sent from the R help mailing list archive at Nabble.com.
I just do not understand what these parameters that must pass the heat map -- View this message in context: http://r.789695.n4.nabble.com/Matrix-heatmap-tp4619084p4620958.html Sent from the R help mailing list archive at Nabble.com.
http://r.789695.n4.nabble.com/file/n4621356/Captura_de_tela-13.png The heat map generated the correct result: library(gplots) arq <-read.table("l") matrix_l <-data.matrix(arq) my.colors <- colorRampPalette(c("gray0","gray10","gray20","gray30","gray40","gray50","gray60","gray80","gray90","gray100")) heatmap.2(matrix_l,dendrogram="none", Rowv=NA, Colv=NA, col=my.colors(256)) -------------------------- Now I have the following file with 5 data, similar to the above: RF00002 RF00013 RF00100 RF00381 RF00434 RF00453 RF00165 RF00496 RF00497 RF00014 RF00048 RF00234 RF00163 RF00008 RF00094 RF00032 RF00028 RF00216 RF00487 RF00209 RF00465 RF00485 RF00363 RF00366 RF00002 63 7 5 7 17 12 14 5 23 3 56 14 72 84 15 64 20 0 1 8 6 65 3 4 RF00013 45 7 4 6 17 12 14 5 23 3 56 12 60 84 15 64 20 0 0 2 2 65 3 4 RF00100 22 1 5 3 2 9 0 0 0 0 5 0 16 8 1 0 0 0 0 0 0 26 2 3 RF00381 63 7 5 13 17 11 3 5 18 3 56 14 33 12 2 15 4 18 12 25 11 69 3 4 RF00434 2 0 0 3 17 11 14 5 23 3 55 12 59 84 15 64 20 0 0 0 0 40 1 3 RF00453 3 1 0 2 16 12 13 3 7 0 45 12 42 78 15 53 20 0 0 0 0 33 2 0 RF00165 0 0 0 2 10 1 14 1 7 0 44 12 38 68 13 48 20 0 0 0 0 18 0 0 RF00496 0 0 0 0 0 0 1 5 6 0 0 0 4 2 0 0 0 0 0 0 0 0 0 0 RF00497 0 0 0 3 10 0 12 5 23 3 40 8 37 77 15 64 20 0 0 0 0 20 0 0 RF00014 0 0 0 0 0 0 0 0 8 3 6 0 0 0 0 0 0 0 0 0 0 0 0 0 RF00048 3 1 0 3 17 10 14 5 23 3 56 12 59 83 15 64 20 0 0 0 0 52 3 3 RF00234 62 7 5 6 17 12 14 5 23 3 56 14 70 84 15 64 20 0 0 0 1 65 3 4 RF00163 63 7 5 7 17 12 14 5 23 3 56 14 75 84 15 64 21 6 1 10 9 65 3 4 RF00008 3 1 0 3 17 12 14 5 23 3 56 12 58 84 15 64 20 0 0 0 0 52 3 2 RF00094 0 0 0 0 0 1 11 0 1 0 0 0 34 73 15 49 20 0 0 0 0 12 0 0 RF00032 0 0 0 3 10 1 14 5 23 3 56 12 43 80 15 64 20 0 0 0 0 21 0 0 RF00028 63 7 5 13 17 12 14 5 23 3 56 14 75 84 15 64 30 23 14 25 20 85 3 4 RF00216 63 7 5 13 17 12 14 5 23 3 56 14 75 84 15 64 28 23 14 25 20 85 3 4 RF00487 63 7 5 13 17 12 14 5 23 3 56 14 75 84 15 64 28 20 14 25 16 83 3 4 RF00209 50 7 5 3 2 2 0 0 0 0 1 2 26 4 0 0 1 0 8 25 5 28 3 3 RF00465 59 7 5 10 7 11 0 0 10 3 11 2 32 9 1 3 6 15 5 14 20 63 3 4 RF00485 63 7 5 13 17 12 14 5 23 3 56 14 75 84 15 64 26 17 14 25 19 85 3 4 RF00363 5 3 0 3 10 1 1 5 20 3 50 12 44 24 5 5 0 0 0 0 0 42 3 3 RF00366 8 2 1 4 14 9 13 5 23 3 52 12 51 68 12 8 0 0 0 0 0 48 3 4 Now I have the following file with 5 data, similar to the above: Is represented by an array of 25x25 and 10x10 not like the previous when I give the command dput (arch) it returns me the following output: structure(list(RF00002 = c(63L, 45L, 22L, 63L, 2L, 3L, 0L, 0L, 0L, 0L, 3L, 62L, 63L, 3L, 0L, 0L, 63L, 63L, 63L, 50L, 59L, 63L, 5L, 8L), RF00013 = c(7L, 7L, 1L, 7L, 0L, 1L, 0L, 0L, 0L, 0L, 1L, 7L, 7L, 1L, 0L, 0L, 7L, 7L, 7L, 7L, 7L, 7L, 3L, 2L), RF00100 = c(5L, 4L, 5L, 5L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 5L, 5L, 0L, 0L, 0L, 5L, 5L, 5L, 5L, 5L, 5L, 0L, 1L), RF00381 = c(7L, 6L, 3L, 13L, 3L, 2L, 2L, 0L, 3L, 0L, 3L, 6L, 7L, 3L, 0L, 3L, 13L, 13L, 13L, 3L, 10L, 13L, 3L, 4L), RF00434 = c(17L, 17L, 2L, 17L, 17L, 16L, 10L, 0L, 10L, 0L, 17L, 17L, 17L, 17L, 0L, 10L, 17L, 17L, 17L, 2L, 7L, 17L, 10L, 14L), RF00453 = c(12L, 12L, 9L, 11L, 11L, 12L, 1L, 0L, 0L, 0L, 10L, 12L, 12L, 12L, 1L, 1L, 12L, 12L, 12L, 2L, 11L, 12L, 1L, 9L), RF00165 = c(14L, 14L, 0L, 3L, 14L, 13L, 14L, 1L, 12L, 0L, 14L, 14L, 14L, 14L, 11L, 14L, 14L, 14L, 14L, 0L, 0L, 14L, 1L, 13L), RF00496 = c(5L, 5L, 0L, 5L, 5L, 3L, 1L, 5L, 5L, 0L, 5L, 5L, 5L, 5L, 0L, 5L, 5L, 5L, 5L, 0L, 0L, 5L, 5L, 5L ), RF00497 = c(23L, 23L, 0L, 18L, 23L, 7L, 7L, 6L, 23L, 8L, 23L, 23L, 23L, 23L, 1L, 23L, 23L, 23L, 23L, 0L, 10L, 23L, 20L, 23L ), RF00014 = c(3L, 3L, 0L, 3L, 3L, 0L, 0L, 0L, 3L, 3L, 3L, 3L, 3L, 3L, 0L, 3L, 3L, 3L, 3L, 0L, 3L, 3L, 3L, 3L), RF00048 = c(56L, 56L, 5L, 56L, 55L, 45L, 44L, 0L, 40L, 6L, 56L, 56L, 56L, 56L, 0L, 56L, 56L, 56L, 56L, 1L, 11L, 56L, 50L, 52L), RF00234 = c(14L, 12L, 0L, 14L, 12L, 12L, 12L, 0L, 8L, 0L, 12L, 14L, 14L, 12L, 0L, 12L, 14L, 14L, 14L, 2L, 2L, 14L, 12L, 12L), RF00163 = c(72L, 60L, 16L, 33L, 59L, 42L, 38L, 4L, 37L, 0L, 59L, 70L, 75L, 58L, 34L, 43L, 75L, 75L, 75L, 26L, 32L, 75L, 44L, 51L), RF00008 = c(84L, 84L, 8L, 12L, 84L, 78L, 68L, 2L, 77L, 0L, 83L, 84L, 84L, 84L, 73L, 80L, 84L, 84L, 84L, 4L, 9L, 84L, 24L, 68L), RF00094 = c(15L, 15L, 1L, 2L, 15L, 15L, 13L, 0L, 15L, 0L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 0L, 1L, 15L, 5L, 12L), RF00032 = c(64L, 64L, 0L, 15L, 64L, 53L, 48L, 0L, 64L, 0L, 64L, 64L, 64L, 64L, 49L, 64L, 64L, 64L, 64L, 0L, 3L, 64L, 5L, 8L), RF00028 = c(20L, 20L, 0L, 4L, 20L, 20L, 20L, 0L, 20L, 0L, 20L, 20L, 21L, 20L, 20L, 20L, 30L, 28L, 28L, 1L, 6L, 26L, 0L, 0L), RF00216 = c(0L, 0L, 0L, 18L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 6L, 0L, 0L, 0L, 23L, 23L, 20L, 0L, 15L, 17L, 0L, 0L), RF00487 = c(1L, 0L, 0L, 12L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 14L, 14L, 14L, 8L, 5L, 14L, 0L, 0L), RF00209 = c(8L, 2L, 0L, 25L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 10L, 0L, 0L, 0L, 25L, 25L, 25L, 25L, 14L, 25L, 0L, 0L), RF00465 = c(6L, 2L, 0L, 11L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 9L, 0L, 0L, 0L, 20L, 20L, 16L, 5L, 20L, 19L, 0L, 0L), RF00485 = c(65L, 65L, 26L, 69L, 40L, 33L, 18L, 0L, 20L, 0L, 52L, 65L, 65L, 52L, 12L, 21L, 85L, 85L, 83L, 28L, 63L, 85L, 42L, 48L), RF00363 = c(3L, 3L, 2L, 3L, 1L, 2L, 0L, 0L, 0L, 0L, 3L, 3L, 3L, 3L, 0L, 0L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L), RF00366 = c(4L, 4L, 3L, 4L, 3L, 0L, 0L, 0L, 0L, 0L, 3L, 4L, 4L, 2L, 0L, 0L, 4L, 4L, 4L, 3L, 4L, 4L, 3L, 4L)), .Names = c("RF00002", "RF00013", "RF00100", "RF00381", "RF00434", "RF00453", "RF00165", "RF00496", "RF00497", "RF00014", "RF00048", "RF00234", "RF00163", "RF00008", "RF00094", "RF00032", "RF00028", "RF00216", "RF00487", "RF00209", "RF00465", "RF00485", "RF00363", "RF00366"), class = "data.frame", row.names = c("RF00002", "RF00013", "RF00100", "RF00381", "RF00434", "RF00453", "RF00165", "RF00496", "RF00497", "RF00014", "RF00048", "RF00234", "RF00163", "RF00008", "RF00094", "RF00032", "RF00028", "RF00216", "RF00487", "RF00209", "RF00465", "RF00485", "RF00363", "RF00366")) but he is not in scale with the gray color I wanted, like he looks like this: http://r.789695.n4.nabble.com/file/n4621356/Captura_de_tela-14.png I wanted to do, that it generates histogram, stayed the count from 0 to 25 (because I have 25 data) and the value of (0-100) -- View this message in context: http://r.789695.n4.nabble.com/Matrix-heatmap-tp4619084p4621356.html Sent from the R help mailing list archive at Nabble.com.
as was follows: library(gplots) arq <-read.table("r") matrix_l <-data.matrix(arq) pdf("heatmap.pdf", height = 10 , width=10) #paleta de 10 cores - sentido branco -> preto my.colors <- colorRampPalette(c("gray100","gray90","gray80","gray70","gray60","gray50","gray40","gray30","gray20","gray10")) heatmap.2(matrix_l,dendrogram="none",trace="none",Rowv=NA, Colv=NA, col=my.colors(10),margins=c(5,10)) I would like to know how to create a graph that shows what appeared since over the other, for example, that the matrix h: RF00013 RF00014 RF00465 RF00363 RF00366 RF00364 RF00035 RF00492 RF00494 RF00502 RF00013 100.00 100.00 100.00 100.00 100.00 100.00 33.33 71.43 100.00 100.00 RF00014 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 RF00465 0.00 66.67 100.00 100.00 100.00 100.00 33.33 0.00 50.00 100.00 RF00363 0.00 0.00 95.00 100.00 75.00 75.00 33.33 0.00 0.00 50.00 RF00366 0.00 0.00 0.00 33.33 100.00 100.00 16.67 0.00 0.00 0.00 RF00364 0.00 0.00 35.00 0.00 75.00 100.00 33.33 0.00 0.00 0.00 RF00035 0.00 66.67 35.00 0.00 0.00 37.50 100.00 28.57 25.00 50.00 RF00492 71.43 66.67 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 RF00494 0.00 66.67 100.00 100.00 100.00 100.00 100.00 71.43 100.00 100.00 RF00502 0.00 0.00 90.00 66.67 0.00 75.00 33.33 0.00 25.00 100.00 I would like to know how to create a graph that shows what appeared since over the other, for example, that the matrix h: looking visually see that the family that came over the other was the RF00366 as represent this using R? , u -- View this message in context: http://r.789695.n4.nabble.com/Matrix-heatmap-tp4619084p4621593.html Sent from the R help mailing list archive at Nabble.com.
Hi what is wrong with heatmap(as.matrix(test), col=my.colors(25)) with test from your dput Regards Petr> The heat map generated the correct result: > > library(gplots) > arq <-read.table("l") > matrix_l <-data.matrix(arq) > my.colors <- > colorRampPalette(c >("gray0","gray10","gray20","gray30","gray40","gray50","gray60","gray80","gray90","gray100"))> heatmap.2(matrix_l,dendrogram="none", Rowv=NA, Colv=NA,col=my.colors(256))> > -------------------------- > > Now I have the following file with 5 data, similar to the above: > > RF00002 RF00013 RF00100 RF00381 RF00434 RF00453 RF00165 > RF00496 RF00497 > RF00014 RF00048 RF00234 RF00163 RF00008 RF00094 RF00032 > RF00028 RF00216 > RF00487 RF00209 RF00465 RF00485 RF00363 RF00366 > RF00002 63 7 5 7 17 12 14 5 23 3 56 14 72 84> 15 64 20 0 1 8 6 65 3 4 > RF00013 45 7 4 6 17 12 14 5 23 3 56 12 60 84> 15 64 20 0 0 2 2 65 3 4 > RF00100 22 1 5 3 2 9 0 0 0 0 5 0 16 8 1 0 > 0 0 0 0 0 26 2 3 > RF00381 63 7 5 13 17 11 3 5 18 3 56 14 33 12> 2 15 4 18 12 25 11 69 3 4 > RF00434 2 0 0 3 17 11 14 5 23 3 55 12 59 84> 15 64 20 0 0 0 0 40 1 3 > RF00453 3 1 0 2 16 12 13 3 7 0 45 12 42 78 > 15 53 20 0 0 0 0 33 2 0 > RF00165 0 0 0 2 10 1 14 1 7 0 44 12 38 68 13 > 48 20 0 0 0 0 18 0 0 > RF00496 0 0 0 0 0 0 1 5 6 0 0 0 4 2 0 0> 0 0 0 0 0 0 0 0 > RF00497 0 0 0 3 10 0 12 5 23 3 40 8 37 77 15 > 64 20 0 0 0 0 20 0 0 > RF00014 0 0 0 0 0 0 0 0 8 3 6 0 0 0 0 0> 0 0 0 0 0 0 0 0 > RF00048 3 1 0 3 17 10 14 5 23 3 56 12 59 83> 15 64 20 0 0 0 0 52 3 3 > RF00234 62 7 5 6 17 12 14 5 23 3 56 14 70 84> 15 64 20 0 0 0 1 65 3 4 > RF00163 63 7 5 7 17 12 14 5 23 3 56 14 75 84> 15 64 21 6 1 10 9 65 3 4 > RF00008 3 1 0 3 17 12 14 5 23 3 56 12 58 84> 15 64 20 0 0 0 0 52 3 2 > RF00094 0 0 0 0 0 1 11 0 1 0 0 0 34 73 15> 49 20 0 0 0 0 12 0 0 > RF00032 0 0 0 3 10 1 14 5 23 3 56 12 43 80 > 15 64 20 0 0 0 0 21 0 0 > RF00028 63 7 5 13 17 12 14 5 23 3 56 14 75 84 > 15 64 30 23 14 25 20 85 3 4 > RF00216 63 7 5 13 17 12 14 5 23 3 56 14 75 84 > 15 64 28 23 14 25 20 85 3 4 > RF00487 63 7 5 13 17 12 14 5 23 3 56 14 75 84 > 15 64 28 20 14 25 16 83 3 4 > RF00209 50 7 5 3 2 2 0 0 0 0 1 2 26 4 0 0 > 1 0 8 25 5 28 3 3 > RF00465 59 7 5 10 7 11 0 0 10 3 11 2 32 9 1 > 3 6 15 5 14 20 63 3 4 > RF00485 63 7 5 13 17 12 14 5 23 3 56 14 75 84 > 15 64 26 17 14 25 19 85 3 4 > RF00363 5 3 0 3 10 1 1 5 20 3 50 12 44 24 5 > 5 0 0 0 0 0 42 3 3 > RF00366 8 2 1 4 14 9 13 5 23 3 52 12 51 68 > 12 8 0 0 0 0 0 48 3 4 > > Now I have the following file with 5 data, similar to the above: > Is represented by an array of 25x25 and 10x10 not like the previous > > when I give the command dput (arch) it returns me the following output: > > structure(list(RF00002 = c(63L, 45L, 22L, 63L, 2L, 3L, 0L, 0L, > 0L, 0L, 3L, 62L, 63L, 3L, 0L, 0L, 63L, 63L, 63L, 50L, 59L, 63L, > 5L, 8L), RF00013 = c(7L, 7L, 1L, 7L, 0L, 1L, 0L, 0L, 0L, 0L, > 1L, 7L, 7L, 1L, 0L, 0L, 7L, 7L, 7L, 7L, 7L, 7L, 3L, 2L), RF00100 = c(5L,> 4L, 5L, 5L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 5L, 5L, 0L, 0L, 0L, 5L, > 5L, 5L, 5L, 5L, 5L, 0L, 1L), RF00381 = c(7L, 6L, 3L, 13L, 3L, > 2L, 2L, 0L, 3L, 0L, 3L, 6L, 7L, 3L, 0L, 3L, 13L, 13L, 13L, 3L, > 10L, 13L, 3L, 4L), RF00434 = c(17L, 17L, 2L, 17L, 17L, 16L, 10L, > 0L, 10L, 0L, 17L, 17L, 17L, 17L, 0L, 10L, 17L, 17L, 17L, 2L, > 7L, 17L, 10L, 14L), RF00453 = c(12L, 12L, 9L, 11L, 11L, 12L, > 1L, 0L, 0L, 0L, 10L, 12L, 12L, 12L, 1L, 1L, 12L, 12L, 12L, 2L, > 11L, 12L, 1L, 9L), RF00165 = c(14L, 14L, 0L, 3L, 14L, 13L, 14L, > 1L, 12L, 0L, 14L, 14L, 14L, 14L, 11L, 14L, 14L, 14L, 14L, 0L, > 0L, 14L, 1L, 13L), RF00496 = c(5L, 5L, 0L, 5L, 5L, 3L, 1L, 5L, > 5L, 0L, 5L, 5L, 5L, 5L, 0L, 5L, 5L, 5L, 5L, 0L, 0L, 5L, 5L, 5L > ), RF00497 = c(23L, 23L, 0L, 18L, 23L, 7L, 7L, 6L, 23L, 8L, 23L, > 23L, 23L, 23L, 1L, 23L, 23L, 23L, 23L, 0L, 10L, 23L, 20L, 23L > ), RF00014 = c(3L, 3L, 0L, 3L, 3L, 0L, 0L, 0L, 3L, 3L, 3L, 3L, > 3L, 3L, 0L, 3L, 3L, 3L, 3L, 0L, 3L, 3L, 3L, 3L), RF00048 = c(56L, > 56L, 5L, 56L, 55L, 45L, 44L, 0L, 40L, 6L, 56L, 56L, 56L, 56L, > 0L, 56L, 56L, 56L, 56L, 1L, 11L, 56L, 50L, 52L), RF00234 = c(14L, > 12L, 0L, 14L, 12L, 12L, 12L, 0L, 8L, 0L, 12L, 14L, 14L, 12L, > 0L, 12L, 14L, 14L, 14L, 2L, 2L, 14L, 12L, 12L), RF00163 = c(72L, > 60L, 16L, 33L, 59L, 42L, 38L, 4L, 37L, 0L, 59L, 70L, 75L, 58L, > 34L, 43L, 75L, 75L, 75L, 26L, 32L, 75L, 44L, 51L), RF00008 = c(84L, > 84L, 8L, 12L, 84L, 78L, 68L, 2L, 77L, 0L, 83L, 84L, 84L, 84L, > 73L, 80L, 84L, 84L, 84L, 4L, 9L, 84L, 24L, 68L), RF00094 = c(15L, > 15L, 1L, 2L, 15L, 15L, 13L, 0L, 15L, 0L, 15L, 15L, 15L, 15L, > 15L, 15L, 15L, 15L, 15L, 0L, 1L, 15L, 5L, 12L), RF00032 = c(64L, > 64L, 0L, 15L, 64L, 53L, 48L, 0L, 64L, 0L, 64L, 64L, 64L, 64L, > 49L, 64L, 64L, 64L, 64L, 0L, 3L, 64L, 5L, 8L), RF00028 = c(20L, > 20L, 0L, 4L, 20L, 20L, 20L, 0L, 20L, 0L, 20L, 20L, 21L, 20L, > 20L, 20L, 30L, 28L, 28L, 1L, 6L, 26L, 0L, 0L), RF00216 = c(0L, > 0L, 0L, 18L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 6L, 0L, 0L, 0L, > 23L, 23L, 20L, 0L, 15L, 17L, 0L, 0L), RF00487 = c(1L, 0L, 0L, > 12L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 14L, 14L, > 14L, 8L, 5L, 14L, 0L, 0L), RF00209 = c(8L, 2L, 0L, 25L, 0L, 0L, > 0L, 0L, 0L, 0L, 0L, 0L, 10L, 0L, 0L, 0L, 25L, 25L, 25L, 25L, > 14L, 25L, 0L, 0L), RF00465 = c(6L, 2L, 0L, 11L, 0L, 0L, 0L, 0L, > 0L, 0L, 0L, 1L, 9L, 0L, 0L, 0L, 20L, 20L, 16L, 5L, 20L, 19L, > 0L, 0L), RF00485 = c(65L, 65L, 26L, 69L, 40L, 33L, 18L, 0L, 20L, > 0L, 52L, 65L, 65L, 52L, 12L, 21L, 85L, 85L, 83L, 28L, 63L, 85L, > 42L, 48L), RF00363 = c(3L, 3L, 2L, 3L, 1L, 2L, 0L, 0L, 0L, 0L, > 3L, 3L, 3L, 3L, 0L, 0L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L), RF00366 = c(4L,> 4L, 3L, 4L, 3L, 0L, 0L, 0L, 0L, 0L, 3L, 4L, 4L, 2L, 0L, 0L, 4L, > 4L, 4L, 3L, 4L, 4L, 3L, 4L)), .Names = c("RF00002", "RF00013", > "RF00100", "RF00381", "RF00434", "RF00453", "RF00165", "RF00496", > "RF00497", "RF00014", "RF00048", "RF00234", "RF00163", "RF00008", > "RF00094", "RF00032", "RF00028", "RF00216", "RF00487", "RF00209", > "RF00465", "RF00485", "RF00363", "RF00366"), class = "data.frame",row.names> = c("RF00002", > "RF00013", "RF00100", "RF00381", "RF00434", "RF00453", "RF00165", > "RF00496", "RF00497", "RF00014", "RF00048", "RF00234", "RF00163", > "RF00008", "RF00094", "RF00032", "RF00028", "RF00216", "RF00487", > "RF00209", "RF00465", "RF00485", "RF00363", "RF00366")) > > but he is not in scale with the gray color I wanted, like he looks like > this: > > http://r.789695.n4.nabble.com/file/n4621356/Captura_de_tela-14.png > > I wanted to do, that it generates histogram, stayed the count from 0 to25> (because I have 25 data) and the value of (0-100) > > > > > > > > > > -- > View this message in context: http://r.789695.n4.nabble.com/Matrix- > heatmap-tp4619084p4621356.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.
how do I plot only the data below 10? everything is white for the 0-10 and 10-90 is black .. those functions which do this? was bad for such basic questions, but I started tinkering with R is 6 days -- View this message in context: http://r.789695.n4.nabble.com/Matrix-heatmap-tp4619084p4625021.html Sent from the R help mailing list archive at Nabble.com.
Hi> > how do I plot only the data below 10? everything is white for the 0-10and> 10-90 is black ..What data below 10? I do not see any. You posted some mails before but I do not keep all mails from R. Only those which helped me somehow. Basically x <- sample(1:100, 100, raplace=TRUE) x[x<10] gives you only values of x below 10. When you put it into another object you can do anything with it.> those functions which do this? > was bad for such basic questions, but I started tinkering with R is 6days Maybe it is time to go through your R installation and find out R intro document. You can do save time by reding it at least some chapters of it, it is not so long. Regards Petr> > -- > View this message in context: http://r.789695.n4.nabble.com/Matrix- > heatmap-tp4619084p4625021.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.