Description Usage Arguments Value Examples
View source: R/sameChoiceDetect.R
Detect continuous same choices in the inventory
1 | sameChoiceDetect(data, k = NULL, index = NULL, keep = TRUE)
|
data |
A data frame. Each row represents an observation, and each column represents an item |
k |
The minimum number of continuous same choices to detect. |
index |
A vector of index of column. Used when there is only a subset of columns is to detected. |
keep |
A logical indicating whether keep the information about the continuous same choices. If is set FALSE, the observations with same choices will be discarded and the information will not be kept. Default is TRUE. |
A data frame, a combination of the original data frame and two other columns:
identical
: An integer, indicates the number of continuous same choices in this observation's answers.
start_index
: The index of the first index of the detected continuous same choices.
1 2 | data('mtcars')
sameChoiceDetect(mtcars, k = 4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.