validatePurchaseItems: Validate input file with items for purchase

Description Usage Arguments Value

Description

Function verifies the content of a file which should contain a list of purchased items. It verifies if the file contains 2 reqauired columns ('Item', 'Count') and if the 'Count' column has numeric values.

Usage

1
validatePurchaseItems(products, file = "discounts")

Arguments

file

path to the file with items to be purchased.

Value

Function returns a list with two elements. Frst element is a logical variable with the result of validation. If the validation fails the second element on the list is the message describing what was wrong. If the validation was successfull then the second element will be a data.frame with items to be purchased.


komisarczyks/CheckoutComponent documentation built on May 20, 2019, 12:55 p.m.