Learn R Programming

walmartAPI (version 0.1.5)

smart_subset: 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

Run this code
# NOT RUN {
smart_subset(1:10, 5)
smart_subset(1:10, 50)
# }

Run the code above in your browser using DataLab