side: Left/right side of a data frame or matrix

View source: R/side.r

sideR Documentation

Left/right side of a data frame or matrix

Description

This function extracts the leftmost or rightmost set of columns of a data frame or matrix.

Usage

side(x, side = 1, n = 3)

Arguments

x

A data.frame or matrix.

side

Either 1 (left side) or 2 (right side), or 'left' or 'right'. Case is ignored and partial matching is used.

n

Number of columns. The default is 3.

Value

A data.frame or matrix.

See Also

corner, head, tail

Examples


side(iris)
side(iris, 2)
side(iris, 'l')
side(iris, 'r')
side(iris, 1, 2)


omnibus documentation built on Sept. 17, 2024, 5:09 p.m.