lsa: Linear Scatterplot Array

View source: R/effective_functions.r

lsaR Documentation

Linear Scatterplot Array

Description

Produces a linear scatterplot array with marginal histograms

Usage

lsa(
  formula,
  xlabels = NULL,
  ylab = NULL,
  data,
  ptsize = 1,
  ptshape = 1,
  ptcol = "gray65",
  linear = TRUE,
  loess = TRUE,
  lm_args = linear_args(),
  lo_args = loess_args(),
  ptalpha = 1,
  ...
)

Arguments

formula

Formula giving the variables to be plotted.

xlabels

Vector of character strings giving the labs of variables to be used in place of the variable names.

ylab

Character string giving y-variable label to be used instead of variable name.

data

A data frame that holds the variables to be plotted.

ptsize

Size of points.

ptshape

Shape of points.

ptcol

Color of points.

linear

Logical indicating whether linear regression line is included.

loess

Logical indicating whether loess smooth should be included.

lm_args

A list of arguments passed to 'geom_smooth()' for the linear regression line.

lo_args

A list or arguments passed to 'geom_smooth()' for the loess smooth.

ptalpha

Alpha of points.

...

Other arguments passed down, currently not implemented.

Value

A cowplot object.

Examples

data(wvs)
lsa(formula = as.formula(sacsecval ~ resemaval + moral + 
                           pct_univ_degree + pct_female + 
                           pct_low_income), 
  xlabels = c("Emancipative Vals", "Moral Perm", 
              "% Univ Degree", "% Female", "% Low Income"), 
  ylab = "Secular Values", 
  data=wvs)

davidaarmstrong/psre documentation built on Aug. 28, 2024, 6:35 a.m.