data_selecting {PriceIndices} | R Documentation |
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
)
Arguments
data |
The user's data frame. It must contain a column |
include |
A vector consisting of words and phrases. The function reduces the data set to one in which the |
must |
A vector consisting of words and phrases. The function reduces the data set to one in which the |
exclude |
A vector consisting of words and phrases. The function reduces the data set to one in which the |
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 |
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.
Examples
data_selecting(milk, include=c("milk"), must=c("UHT"))
data_selecting(milk, must=c("milk"), exclude=c("paust"))