scatter.data.frame {metaplot}R Documentation

Scatterplot Method for Data Frame

Description

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

Usage

## 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

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)

[Package metaplot version 0.8.4 Index]