na_scatter: Scatterplot colored by appearence of missing values

Description Usage Arguments Examples

View source: R/plot.R

Description

Scatterplot colored by appearence of missing values

Usage

1
2
na_scatter(data, formula, col = c("lightblue", "red"), alpha = 0.3,
  pch = 16L, cex = 1, legend = "topright", ...)

Arguments

data

a data.frame.cala

formula

an object of class "formula": a symbolic description of the model to be fitted. It must take form of z ~ x + y, where z is a variable containing missing values and x and y are the variables to plot.

col, pch, cex, alpha

a two-value vector of colors, plotting characters, scaling, and transparency (value between 0 and 1) for non-missing and missing values. If provided as a scalar, same value is used for both non-missing and missing values.

legend

position of legend, if NULL, legend is not printed.

...

additional arguments passed to plot.

Examples

1
2
3
4
5
6
7
set.seed(123)

dat <- mtcars
dat$disp[sample.int(nrow(dat), 10)] <- NA

na_scatter(dat, disp ~ mpg + wt)
na_scatter(dat, disp ~ mpg + jitter(cyl, 1.1))

twolodzko/misster documentation built on May 24, 2019, 2:54 p.m.