sameChoiceDetect: Detect continuous same choices in the inventory

Description Usage Arguments Value Examples

View source: R/sameChoiceDetect.R

Description

Detect continuous same choices in the inventory

Usage

1
sameChoiceDetect(data, k = NULL, index = NULL, keep = TRUE)

Arguments

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.

Value

A data frame, a combination of the original data frame and two other columns:

Examples

1
2
data('mtcars')
sameChoiceDetect(mtcars, k = 4)

LeiGuo0812/lightStat documentation built on June 27, 2021, 9:17 p.m.