Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

52_combined_head_and_tail

Combined Head and Tail Functions


Description

Combined head and tail functions.

Usage

## S3 method for class 'ObjectArray'
headt(x, nh=3, nt=nh, ...)
## S3 method for class 'MatrixLike'
headt(x, nh=3, nt=nh, ...)
## S3 method for class 'data.frame'
headt(x, nh=3, nt=nh, ...)
## S3 method for class 'matrix'
headt(x, nh=3, nt=nh, ...)

## Default S3 method:
headt(x, nh=3, nt=nh, ...)

Arguments

x

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

Examples

x <- matrix (1:2700, 30, 90)
isep <- seq (3L, 27L, 3L)
jsep <- seq (3L, 87L, 3L)

pm <- as.PartMatrix (x, isep, jsep)

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

vectools

Advanced Vector Toolkit

v0.2.0
GPL (>= 2)
Authors
Abby Spurdle
Initial release
2020-10-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.