getTotalCost: Total cost calculation

Description Usage Arguments Value

Description

Function calculates total cost from a data.frame containing purchased items.

Usage

1
getTotalCost(costTab, decimal = TRUE)

Arguments

costTab

a data.frame with a list of purchased items. Requires a column called 'Cost'

decimal

if TRUE then function will format cost value to have 2 decimal places.

Value

Function returns total cost of purchased items as numeric (if decimal is FALSE) or as character string (when decimal is TRUE)


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