smart_subset {walmartAPI}R Documentation

Subsets up to n elements in a vector

Description

Subsets up to n elements in a vector

Usage

smart_subset(x, n)

Arguments

x

A vector.

n

A number.

Value

vector of length equal to length of x or n, whichever is smallest.

Examples

smart_subset(1:10, 5)
smart_subset(1:10, 50)

[Package walmartAPI version 0.1.5 Index]