Try this:
# define the locations on the x axis for each cell in the image
nxcells <- dim(m)[2]
xlocs <- (seq(nxcells)-1)/(nxcells-1)
# define the groupings
group <- rep(1:3, c(10, 20, 25))
# calculate the range of locations on the xaxis for each group
group.ranges <- sapply(split(xlocs, group),
Hi, I have a matrix that I am displaying via image. I would like to
obtain an image where the columns are 'grouped' (I have a grouping
variable). But I am not sure how how I can draw the lines to indicate
the grouping in the margin. I realize this is essentially waht heatmap
does but as I have a se
2 matches
Mail list logo