Randomly select a few elements of an object, typically a data frame,
matrix, vector, or list. If the object is a data frame or a matrix,
then rows are sampled.

Usage

some(x, ...)

# S3 method for data.frame
some(x, n=10, cols=NULL, ...)

# S3 method for matrix
some(x, n=10, cols=NULL, ...)

# S3 method for default
some(x, n=10, ...)

Value

Sampled elements or rows.

Arguments

x

the object to be sampled.

n

number of elements to sample.

cols

if NULL, use all columns, if a vector of column names or numbers, use only the columns indicated