make_lineup_dat: Make a lineup plot data

Description Usage Arguments Value Examples

View source: R/make_lineup_data.R

Description

Function to create stacked dataframe with M pairs of plots based on original dataframe named dat. ItWill randomize the order labels used in building plot lineup

Usage

1
2
make_lineup_dat(M, dat, xname = "x", yname = "y", seed = NULL,
  bootstrap = FALSE, jitter = 0, both = FALSE)

Arguments

M

number of pairs of plots

dat

dataframe

xname

column name from dat for x-dimension in plots (defaults "x")

yname

column name from dat for y-dimension in plots (defaults "y")

seed

set random seed for reproducible lineups

bootstrap

logical indicator of if (bootstrap==TRUE) bootstrapping used, if (bootstrap==FALSE) then LOESS residuals permuted

jitter

amount of jitter to add to point locations - units of sds

both

logical indicator to run both LOESS residual permutation and bootstrapping of points

Value

dataframe with columns x, permy, type, order

Examples

1
2
3
4
dat=data.frame(x=rnorm(25))
dat$y=dat$x+rnorm(25)
lineup_dat = make_lineup_dat(M=8, dat, xname="x", yname="y")
lineup_dat = make_lineup_dat(M=8, dat, xname="x", yname="y",bootstrap=T,jitter=T)

kmaurer/teaTasteR documentation built on Jan. 22, 2020, 5:18 a.m.