title: Dividing by Columns & Rows Doesn't Work with 'ComplexHeatmap' - Even Using Their Own Example?
body: <p>I'm currently trying to assemble a heatmap using <code>ComplexHeatmap</code>. However, when I try to divide my heatmap by columns and rows it doesn't work.</p>
  
  <p>When I go back to the <a href="https://jokergoo.github.io/ComplexHeatmap-reference/book/a-single-heatmap.html#split-by-categorical-variables" rel="nofollow noreferrer">documentation</a> that accompanies <code>ComplexHeatmap</code> I have discovered that their own example will not work, returning an error message of <code>unused arguments</code>. I was wondering whether someone would be able to shed some light on what might be going on.</p>
  
  <p>Here is the example matrix:</p>
  
  <pre><code>set.seed(123)
  nr1 = 4; nr2 = 8; nr3 = 6; nr = nr1 + nr2 + nr3
  nc1 = 6; nc2 = 8; nc3 = 10; nc = nc1 + nc2 + nc3
  mat = cbind(rbind(matrix(rnorm(nr1*nc1, mean = 1,   sd = 0.5), nr = nr1),
                    matrix(rnorm(nr2*nc1, mean = 0,   sd = 0.5), nr = nr2),
                    matrix(rnorm(nr3*nc1, mean = 0,   sd = 0.5), nr = nr3)),
              rbind(matrix(rnorm(nr1*nc2, mean = 0,   sd = 0.5), nr = nr1),
                    matrix(rnorm(nr2*nc2, mean = 1,   sd = 0.5), nr = nr2),
                    matrix(rnorm(nr3*nc2, mean = 0,   sd = 0.5), nr = nr3)),
              rbind(matrix(rnorm(nr1*nc3, mean = 0.5, sd = 0.5), nr = nr1),
                    matrix(rnorm(nr2*nc3, mean = 0.5, sd = 0.5), nr = nr2),
                    matrix(rnorm(nr3*nc3, mean = 1,   sd = 0.5), nr = nr3))
  )
  mat = mat[sample(nr, nr), sample(nc, nc)] # random shuffle rows and columns
  rownames(mat) = paste0("row", seq_len(nr))
  colnames(mat) = paste0("column", seq_len(nc))
  </code></pre>
  
  <p>Which gives you the following:</p>
  
  <p><a href="https://i.stack.imgur.com/1DojZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1DojZ.png" alt="enter image description here"></a></p>
  
  <p>And here is the command demonstrating how to use row and column split:</p>
  
  <pre><code>install.packages('ComplexHeatmap')
  
  
  Heatmap(mat, name = "mat", 
          row_split = rep(c("A", "B"), 9), column_split = rep(c("C", "D"), 12))
  </code></pre>
  
  <p>Here is the output the creators of ComplexHeatmap say I should expect, which as you can see is nicely divided into four tiles.</p>
  
  <p><a href="https://i.stack.imgur.com/yigSB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yigSB.png" alt="enter image description here"></a></p>
  
  <p>But all I get is the following error message:</p>
  
  <pre><code>Error in Heatmap(mat, name = "mat", row_split = rep(c("A", "B"), 9), column_split = rep(c("C",  : 
    unused arguments (row_split = rep(c("A", "B"), 9), column_split = rep(c("C", "D"), 12))
  </code></pre>
  
  <p>As even the example they provide doesn't work I'm struggling to make any headway.</p>
  
  <p>I've already swapped packages once as for some reason <a href="https://www.rdocumentation.org/packages/gplots/versions/3.0.1.1/topics/heatmap.2" rel="nofollow noreferrer">heatmap.2</a> began behaving highly erratically, for which I have raised <a href="https://stackoverflow.com/questions/55690285/parts-missing-from-plot-that-then-reappear-and-overwrite-the-entire-plot-when-s?fbclid=IwAR3F4KA1g5aSzgw30H4VTuBhRk05eC2-qeL5Bjn6NCuQgZrCSK7a80yS85E">another question</a> elsewhere.</p>