align_soas: aligns SOAs

Description Usage Arguments Author(s) Examples

View source: R/align_soas.R

Description

align_soas evaluates a vector of SOAs and tries to align slightly different SOA values by rounding them in a way that we end up in n_soa different SOAs. If you want, align_soas can plot a histogram of difference between original input vector and the output vector provided by this function.

Usage

1
2
3
4
5
6
7
8
align_soas(
  soa_vec,
  n_soa = 20,
  round_factor = 2,
  soa_spacing = 42,
  verbose = TRUE,
  difference_plot = FALSE
)

Arguments

soa_vec

vector of SOAs

n_soa

number of SOAs in the paradigm

round_factor

defines the second argument for the round() command decimal value with which to start the rounding procedure.

soa_spacing

needs ms value of spacing between SOAs. Will use this to group all SOAs with a difference < soa_spacing. By default, it will try to achieve n_soa SOAs with round_factor =2 and will give out warnings.

verbose

def = T

difference_plot

def = F

Author(s)

René Michel

Examples

1
repeated_data = rep_dataframe(data, 2, "rbind")

remichel/rmTools documentation built on Dec. 11, 2021, 6:59 a.m.