cull: Force objects to have length or rows equal to the shortest

View source: R/cull.r

cullR Documentation

Force objects to have length or rows equal to the shortest

Description

This function takes a set of vectors, data frames, or matrices and removes the last values/rows so that they all have a length/number of rows equal to the shortest among them.

Usage

cull(...)

Arguments

...

Vectors, matrices, or data frames.

Value

A list with one element per object supplied as an argument to the function.

Examples

a <- 1:10
b <- 1:20
c <- letters
cull(a, b, c)
x <- data.frame(x=1:10, y=letters[1:10])
y <- data.frame(x=1:26, y=letters)
cull(x, y)

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