cut_evenly: Evenly divide the range 0 to 1 into n pieces

Description Usage Arguments Value See Also Examples

View source: R/helpers.R

Description

This function work very well in combination with percentify_cut to create evenly spaced intervals.

Usage

1

Arguments

n

number of points

Value

numeric vector of length n-1.

See Also

percentify_cut

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
cut_evenly(3)
cut_evenly(4)
cut_evenly(9)

library(dplyr)

# cut_evenly() is primarily used along with percentify_cut() to space the
# cuts easily.
percentify_cut(mtcars, mpg, cut_evenly(4)) %>%
  summarise(mean(wt))

EmilHvitfeldt/percentify documentation built on July 9, 2019, 10:54 p.m.