bin_vector: Bin vectors

Description Usage Arguments

View source: R/compute_bin.R

Description

A generic and several implementations for binning vectors.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
bin_vector(x, weight = NULL, ...)

## S3 method for class 'numeric'
bin_vector(x, weight = NULL, ..., width = NULL,
  center = NULL, boundary = NULL, closed = c("right", "left"),
  pad = TRUE)

## S3 method for class 'POSIXct'
bin_vector(x, weight = NULL, ..., width = NULL,
  center = NULL, boundary = NULL, closed = c("right", "left"),
  pad = TRUE)

Arguments

x

a vector to bin

weight

if specified, an integer vector of the same length as x representing the number of occurances of each value in x

...

additional arguments passed through to instances of the generic

width

the width of a bin

center

the center of a bin

boundary

the boundary of a bin. center and boundary should not both be specified.

closed

One of "right" or "left" indicating whether right or left edges of bins are included in the bin.

pad

a logical indicatign whether the bins should be padded to include an empty bin on each side.


rpruim/ggvis2 documentation built on May 28, 2019, 2:34 a.m.