Description Usage Arguments Value Examples

Displays two heatmaps of matrices using red and blue colors. Options to scale
and sort as well as any other graphical parameters with ... Sorting attempts to match
columns between the two matrices using their correlation over rows. If `sort==TRUE`

then the new ordering for the second matrix is returned.

1 2 3 |

`x1` |
matrix |

`x2` |
matrix |

`high` |
string of either 'red' or 'blue' used to show higher values |

`xaxt` |
string indicating how to display the x axis. Suppress x axis with 'n' |

`yaxt` |
string indicating how to display the y axis. Suppress y axis with 'n' |

`scale` |
logical indicating whether the matrices should be z scaled to have columns with norm zero and standard deviation one. |

`absol` |
logical indicating whether to take absolute value of the entries before plotting |

`sort` |
logical indicating whether the columns of the matrix should be sorted in decreasing order of their means |

`center` |
logical indicating wether to center ranges for x and y around zero |

`main1` |
string to be used as the main title for the first matrix image |

`main2` |
string to be used as the main title for the second matrix image |

`...` |
other graphical parameters passed to image |

If `sort==TRUE`

the ordering of the second matrix used to match columns.

1 2 3 4 5 6 | ```
par(mfrow=c(1,2))
im_2_mat(matrix(1:12, nrow=3, ncol=4), matrix(13:24, nrow=3, ncol=4), sort=FALSE, scale=FALSE)
im_2_mat(matrix(1:12, nrow=3, ncol=4), matrix(13:24, nrow=3, ncol=4), sort=TRUE, scale=FALSE)
im_2_mat(matrix(1:12, nrow=3, ncol=4), matrix(13:24, nrow=3, ncol=4), sort=TRUE, scale=TRUE)
im_2_mat(matrix(1:12, nrow=3, ncol=4), matrix(13:24, nrow=3, ncol=4), sort=FALSE,
scale=FALSE, center=TRUE)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.