Define margins.

Usage

margin(t = 0, r = 0, b = 0, l = 0, unit = "pt")

Arguments

t,b,r,l
Dimensions of each margin. (To remember order, think trouble).
unit
Default units of dimensions. Defaults to "pt" so it can be most easily scaled with the text.

Description

This is a convenience function that creates a grid unit object of the correct length to use for setting margins.

Examples

margin(4)
[1] 4pt 0pt 0pt 0pt
margin(4, 2)
[1] 4pt 2pt 0pt 0pt
margin(4, 3, 2, 1)
[1] 4pt 3pt 2pt 1pt