Description Usage Arguments Value
Function verifies the content of a file which should contain a list of discounts applicable when buying two different products. It verifies if the file contains 3 reqauired columns ('Item1', 'Item2' and 'Discount') and if the 'Discount' column has numeric values.
1 | validateDiscounts(products, file = "discounts")
|
file |
path to the file with discount list for buying a pair of products. |
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 discounts read from file.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.