linval: Breaks up the data into groups according to the user...

Description Usage Arguments Examples

View source: R/linval.r

Description

Breaks up the data into groups according to the user specified type and then plots using the geoms found in the ggplot2 package.

Usage

1
linval(formula, data, reduction, ...)

Arguments

formula

formula should be expressed as the model of interest in the form y ~ x1 + x2 + ...

data

input data

reduction

Either a string or a function. If a string, looks for function called paste("reduce_", reduction). Used to reduce the size of the data to make visualisation easier.

...

Other parameters passed on to reduction function.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# By quantile
d_quantiles <- linval(price ~ carat + color + clarity, data = diamonds,
  reduction = "qgrid", bins = 4)

d_evenly_spaced <- linval(formula = price ~ carat + color + clarity,
  data = diamonds, reduction = "egrid")

d_extremes <- linval(price ~ depth + table + carat + color + clarity,
  data = diamonds, reduction = "extremes")

d_user_breaks <- linval(price ~ carat + color + clarity,
  data = diamonds, reduction = "egrid",
  breaks = list(carat = c(0.4, 0.8, 3.0)))

d_as_is <- linval(price ~ carat + color + clarity,
  data = diamonds, reduction = "nothing")

hadley/linval documentation built on May 17, 2019, 10:42 a.m.