data_2x2: Repeated measures data structure

Description Usage Arguments Value Examples

View source: R/data_2x2.R

Description

This function transforms your data array('s) into the data structure that is needed to visualize a 2x2 repeated measure.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data_2x2(
  array_1,
  array_2,
  array_3,
  array_4,
  array_5,
  array_6,
  label_1,
  label_2,
  jit_distance = 0,
  jit_seed = 321,
  spread_x_ticks = FALSE
)

Arguments

array_1

<numeric> the array of datapoints to be plotted

array_2

<numeric> the array of datapoints to be plotted

array_3

<numeric> the array of datapoints to be plotted

array_4

<numeric> the array of datapoints to be plotted

array_5

<numeric> the array of datapoints to be plotted

array_6

<numeric> the array of datapoints to be plotted

label_1

<string> group 1

label_2

<string> group 2

jit_distance

<numeric> the amount of distance between jittered datapoints (0 by default)

jit_seed

<numeric> the amount used in set.seed() (321 by default)

spread_x_ticks

<bool> FALSE if 2 x ticks, TRUE if 4 x ticks

Value

data_2x2

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
# Using an example dataset
df_2x2_1.0 <- data_2x2(
                      array_1 = iris$Sepal.Length[1:50],
                      array_2 = iris$Sepal.Length[51:100],
                      array_3 = iris$Sepal.Length[101:150],
                      array_4 = iris$Sepal.Length[81:130],
                      label_1 = 'congruent',
                      label_2 = 'incongruent',
                      jit_distance = .05,
                      jit_seed = 321,
                      spread_x_ticks = TRUE)



## End(Not run)

jorvlan/openvis documentation built on Dec. 6, 2020, 3:06 a.m.