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)

adamlilith/omnibus documentation built on May 3, 2024, 9:49 a.m.