data_selecting: Selecting products from the user's data set for further price index calculations
Description
The function returns a subset of the user's data set obtained by selection based on keywords and phrases.
Usage
data_selecting(
data,
include = c(),
must = c(),
exclude = c(),
sensitivity = FALSE,
coicop = NULL
)
Value
The function returns a subset of the user's data set obtained by selection based on keywords and phrases defined by parameters: include, must and exclude (an additional column coicop is optional). Providing values of these parameters, please remember that the procedure distinguishes between uppercase and lowercase letters only when sensitivity is set to TRUE.
Arguments
data
The user's data frame. It must contain a column description (as character).
include
A vector consisting of words and phrases. The function reduces the data set to one in which the description column contains any of these values.
must
A vector consisting of words and phrases. The function reduces the data set to one in which the description column contains each of these values.
exclude
A vector consisting of words and phrases. The function reduces the data set to one in which the description column does not contain any of these values.
sensitivity
A logical parameter indicating whether sensitivity to lowercase and uppercase letters is taken into consideration (if yes, its value is TRUE).
coicop
An optional parameter indicating a value for an additional column coicop which is added to the resulting data frame