Skip to contents

Computes means by group and plots them in as a scatterplot

Usage

scatter_means_ci(
  variable1,
  variable2,
  group,
  data,
  plot = TRUE,
  print = TRUE,
  smooth.method = "lm",
  drop.groups = NULL
)

Arguments

group

Grouping variable

data

Data frame

plot

Logical. Should the plot be created?

print

Logical. Should the result be printed in the console?

var1

Variable to plot on x axis

var2

Variable to plot on y axis

Details

Recommended to use with `with` function, as in example.

Examples

scatter_means_ci('alcfreq', 'HE', 'cntry', ESS, plot=T, print=TRUE)
#> Loading required package: ggrepel
#> Error: object 'ESS' not found