some

0th

Percentile

Sample a Few Elements of an Object

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.

Keywords
utilities
Usage
some(x, ...)

## S3 method for class 'data.frame':
some(x, n=10, ...)

## S3 method for class 'matrix':
some(x, n=10, ...)

## S3 method for class 'default':
some(x, n=10, ...)
Arguments
x
the object to be sampled.
n
number of elements to sample.
...
arguments passed down.
Value

  • Sampled elements or rows.

Note

These functions are adapted from head and tail in the utils package.

See Also

head, tail.

Aliases
  • some
  • some.data.frame
  • some.matrix
  • some.default
Examples
some(data.frame(z=rnorm(100), u=runif(100)))
Documentation reproduced from package car, version 1.2-15, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.