sample_vectors: Sample from two vectors

View source: R/helpers.r

sample_vectorsR Documentation

Sample from two vectors

Description

Prepares a list of sample values from two given vectors v1 & v2 for the bootstrapping workflow. This function is important for internal use.

Usage

sample_vectors(v1, v2, size, by, seed, replace)

Arguments

v1, v2

Vectors of interactions from which to sample.

size

Integer giving the total sample size which, for example, can be the length of the shortest vector of interactions or of the longest one. Passed to sample.

by

Integer. Number of interactions used to increase gradually the sampled vectors of interactions until all observations are sampled (given in the size argument).

seed

A single integer value. Passed to set.seed. Set seed to get reproducible random results.

replace

Should sampling be with replacement? Passed to sample.

Value

A list of two lists of character vectors containing interactions.


valentinitnelav/bootdissim documentation built on Oct. 11, 2022, 12:34 a.m.