Learn R Programming

metaseqR (version 1.12.2)

make.grid: Optimize rectangular grid plots

Description

Returns a vector for an optimized m x m plot grid to be used with e.g. par(mfrow). m x m is as close as possible to the input n. Of course, there will be empty grid positions if n < m x m.

Usage

make.grid(n)

Arguments

n
An integer, denoting the total number of plots to be created.

Value

  • A 2-element vector with the dimensions of the grid.

Examples

Run this code
g1 <- make.grid(16) # Returns c(4,4)
g2 <- make.grid(11) # Returns c(4,3)

Run the code above in your browser using DataLab