R/repColsRows.R

Defines functions layColRepGenerator

layColRepGenerator <- function(side)
{
  if(side == "widths") fnc <- lay_bind_col
  if(side == "heights") fnc <- lay_bind_row
  
  function(layout, n)
  {
    layall <- layout
    if(n > 1) for(i in 2:n)
    {
      size <- c(i-1,1)
      layall <- fnc(layall,layout, size)
    }
    layall
  }
}

layRepByCol <- layColRepGenerator("widths")
layRepByRow <- layColRepGenerator("heights")

Try the customLayout package in your browser

Any scripts or data that you put into this service are public.

customLayout documentation built on Jan. 16, 2021, 5:26 p.m.