coenocliner-internal: Pretty Display of a Matrix or Data Frame

Description Usage Arguments Value Author(s) Examples

Description

Pretty display of the first n rows of a data frame or matrix-like object, with variables/columns that cannot fit on a single screen width removed.

Usage

1
prettyHead(x, n = 10, width = getOption("width"), zapsmall = FALSE)

Arguments

x

an R object for which head and as.data.frame methods exist.

n

numeric; the number of rows to display

width

numeric; the display width to assume when formatting the data frame. The default is given by getOption("width")

zapsmall

logical; should values close to zero be zapped to zero? See zapsmall for details.

Value

A format-ed data frame with n rows (or n+1 rows if only a subset is shown) and as many columns/components that can be printed on a single screen width.

Author(s)

Gavin L. Simpson

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
x <- seq(from = 4, to = 6, length = 30)
opt <- seq(4, 7, length = 100)
tol <- rep(0.25, 100)
h <- rep(20, 100)

## simulate
set.seed(1)
y <- coenocline(x, responseModel = "gaussian",
                params = cbind(opt = opt, tol = tol, h = h),
                countModel = "poisson")

prettyHead(y)

coenocliner documentation built on May 29, 2017, 3:57 p.m.