-1

I have made matrix using pheatmap and need to be able to reclassify it into 8 classifications. Any help would be greatly appreciated and I have placed the code below.

   pheatmap(y, cluster_row=FALSE, cluster_col=FALSE, display_numbers=TRUE, 
      color=colorRampPalette(rev(brewer.pal(n=10,name="RdYlBu")))(8))

The packages I have used are as follows: RColorBrewer,rgdal,ggplot2,pheatmap and raster. I am new to programming so please don't be too harsh.

Thanks for the help.

dww
  • 30,425
  • 5
  • 68
  • 111
Hasawa
  • 1

1 Answers1

0

In the documentation there is an argument: kmeans_k. Did you try setting that to 8?

jwells
  • 92
  • 2
  • 11