products: Detecting and summarising available, matched, new and...

View source: R/f_data_processing.R

productsR Documentation

Detecting and summarising available, matched, new and disappearing products.

Description

This function detects and summarises available, matched, new as well as disappearing products on the basis of their prodIDs.

Usage

products(data, start, end)

Arguments

data

The user's data frame with information about sold products. It must contain columns: time (as Date in format: year-month-day,e.g. '2020-12-01') and prodID (as numeric, factor or character).

start

The base period (as character) limited to the year and month, e.g. "2020-03".

end

The research period (as character) limited to the year and month, e.g. "2020-04".

Value

This function detects and summarises available, matched, new and disappearing products on the basis of their prodIDs. It compares products from the base period (start) with products from the current period (end). It returns a list containing the following objects: details with prodIDs of available, matched, new and disappearing products, statistics with basic statistics for them and figure with a pie chart describing a contribution of matched, new and disappearing products in a set of available products.

Examples

list<-products(milk, "2018-12","2019-12")
list$details
list$statistics
list$figure


PriceIndices documentation built on July 9, 2023, 6:20 p.m.