View source: R/ch.getCombinationsOfOneVector.r
ch.getCombinationsOfOneVector | R Documentation |
This function to creates a data frame composed of one sets of combinations. It creates a data frame for Combination A (take n items r at a time, order doesn't matter).
ch.getCombinationsOfOneVector(
itemSet,
minNumPerSide = 1,
maxNumPerSide = 2,
sample = "all",
nStimPerGroup = 0
)
minNumPerSide |
An integer that specifies the minimum number of items in group. DEFAULT = 1 |
maxNumPerSide |
An integer that specifies the minimum number of items in group. DEFAULT = 1 |
sample |
A string that specifies how to sample the items to create the combinations. The choices are: (1) "byGroup" for each group size (1, 2, etc) the sample size will equal nStimPerGroup; (2) "random" the entire set sample size will equal nStimPerGroup; (3) "all" all the combinations will be generated, without taking a sample (nStimPerGroup is ignored in this case). DEFAULT = "all" The samples will all be drawn randomly without replacement, unless the sample size is greater than the number of possible combinations. In that case the sample will be drawn randomly with replacement. |
nStimPerGroup |
An integer specifying the number of stim per group to select. If nStimPerGroup == 0, then the program will select all the single trials, and use that total as nStimPerGroup. |
data |
A vector of items that will be combined. |
dataframe with the all the combinations. The columns are labled IA.# and IB.# to indicate the group.:
ch.getCombinationsOfOneVector (itemSet = c("item1","item2","item3", "item4"), minNumPerSide = 1, maxNumPerSide = 1, sample = "all", nStimPerGroup = 0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.