Learn R Programming

oce (version 1.0-1)

vectorShow: Show some values from a vector

Description

This is similar to str, but it shows data at the first and last of the vector, which can be quite helpful in debugging.

Usage

vectorShow(v, msg, digits = 5, n = 2L)

Arguments

v

the vector.

msg

a message to show, introducing the vector. If not provided, then a message is created from v.

digits

for numerical values of v, this is the number of digits to use, in formatting the numbers with format; otherwise, digits is ignored.

n

number of elements to at start and end. If n is negative, then all the elements are shown.

Value

A string, suitable for using in cat or oceDebug.