scatter.data.frame: Scatterplot Method for Data Frame

Description Usage Arguments See Also Examples

View source: R/scatter.R

Description

Scatterplot method for class 'data.frame'. Parses arguments and generates the call: fun(x, yvar, xvar, groups, facets, ...).

Usage

1
2
3
## S3 method for class 'data.frame'
scatter(x, ..., fun = metOption("scatter",
  "scatter_data_frame"), verbose = metOption("verbose_scatter", FALSE))

Arguments

x

data.frame

...

passed to fun

fun

function to draw the plot

verbose

generate messages describing process

See Also

scatter_data_frame

Other bivariate plots: iso_prepanel, metaplot.data.frame, scatter_data_frame, scatter

Other scatter: metaplot_key, scatter_data_frame, scatter_panel, scatter

Other methods: axislabel.data.frame, boxplot.data.frame, categorical.data.frame, corsplom.data.frame, densplot.data.frame, metaplot.data.frame, pack.data.frame, plot.metaplot_gtable, print.metaplot_gtable, unpack.data.frame

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
library(magrittr)
library(dplyr)
attr(Theoph$conc,'label') <- 'theophylline concentration'
attr(Theoph$conc,'guide') <- 'mg/L'
attr(Theoph$Time,'label') <- 'time'
attr(Theoph$Time,'guide') <- 'h'
attr(Theoph$Subject,'guide') <- '////'
# setOption(gg = T)
scatter(Theoph,conc, Time)
scatter(Theoph, conc, Time, Subject) # Subject as groups
scatter(Theoph, conc, Time, , Subject) # Subject as facet
scatter(Theoph, conc, Time, , Subject, gg = TRUE, scales = 'free_y' )
scatter(Theoph %>% filter(conc > 0), conc, Time, Subject, ylog = TRUE, yref = 5)
scatter(Theoph, conc, Time, Subject, ysmooth = TRUE)
scatter(Theoph, conc, Time, conf = TRUE, loc = 3, yref = 6)
scatter(Theoph, conc, Time, conf = TRUE, loc = 3, yref = 6, global = TRUE)
## Not run: 
\dontshow{
attr(Theoph,'title') <- 'Theophylline'
scatter(Theoph, conc, Time, main = function(x,...)attr(x,'title'))
scatter(Theoph, conc, Time, sub= function(x,...)attr(x,'title'))
setOption(main = function(x,...)attr(x,'title'))
scatter(Theoph, conc, Time)
}

## End(Not run)

metaplot documentation built on May 1, 2019, 10:17 p.m.