cp_breaks: Calculate Map Breaks

Description Usage Arguments

View source: R/cp_breaks.R

Description

This function wraps the process I have been using to construction data classes for choropleth maps using ggplot2.

Usage

1
cp_breaks(.data, var, newvar, classes, style, clean_labels = TRUE)

Arguments

.data

A tbl or sf object

var

The existing variable to create classes of

newvar

The new variable for storing the factor data

classes

The number of breaks or classes to create

style

The method for calculating classes, see classInt::classIntervals

clean_labels

A logical scalar; if TRUE, the comma will be converted to a dash and the parantheses and brackets will be removed


chris-prener/prener documentation built on May 17, 2019, 9:12 a.m.