capture.and.write: Capture output and Write / Print First and Last Parts
Description
Capture output and print first and last parts, eliding
middle parts. P articularly useful for teaching purposes,
and e.g., in SweaveUsage
capture.and.write(EXPR, first, last = 2, middle = NA,
i.middle, dotdots = " ....... ", n.dots = 2)Arguments
EXPR
the (literal) expression the output of which is to be
captured.
first
integer: how many lines should be printed at beginning.
last
integer: how many lines should be printed at the end.
middle
numeric (or NA logical):
i.middle
index start of middle part
dotdots
string to be used for elided lines
n.dots
number of dotdots ....