Learn R Programming

vectools (version 0.3.0)

47_combined_head_and_tail: Combined Head and Tail Functions

Description

Combined head and tail functions.

Usage

# S3 method for ObjectArray
headt(v, nh=3, nt=nh, …)
# S3 method for MatrixLike
headt(v, nh=3, nt=nh, …)
# S3 method for data.frame
headt(v, nh=3, nt=nh, …)
# S3 method for matrix
headt(v, nh=3, nt=nh, …)

# S3 method for raster headt(v, nh=3, nt=nh, …)

# S3 method for default headt(v, nh=3, nt=nh, …)

Arguments

v

A suitable object.

nh, nt

Integers, the number of head/tail elements/rows. In matrix-based objects, can also be a vector of length two. (In which case, the second value applies to the number of columns). Note that currently, in PartMatrix and SectMatrix objects, nh and nt includes formatted lines. However, this may change, in the future.

Ignored.

Value

Currently, some of the functions return formatted character matrices, however, it's possible this may change in the future.

See Also

ghead.data.frame

Examples

Run this code
# NOT RUN {
x <- matrix (1:2700, 30, 90)
rsep <- seq (3, 27, 3)
csep <- seq (3, 87, 3)

pm <- as.PartMatrix (x, rsep, csep)

headt (pm, 10, c (5, 1) )
# }

Run the code above in your browser using DataLab