PriceBC: Calculate bills after taxes and tips

Description Usage Arguments Value Examples

View source: R/PriceBC.R

Description

Calculates the additional costs of taxes and tips when buying in the food and retail services in British Columbia, Canada.

Usage

1
PriceBC(type, PriceTag, MealBill, AlcoholBill, Tip)

Arguments

type

Character vector defining the type of service, food or retail. Taxes and tips apply differently to each service. Requires "Restaurant" or "Sale" as argument input.

PriceTag

Numeric vector indicating the cost of products to buy in the retail service, before taxes.

MealBill

Numeric vector indicating the cost of food and non-alcoholic beverages in the food service, before taxes.

AlcoholBill

Numeric vector indicating the cost of alcoholic beverages, before taxes.

Tip

Numeric vector indicating the percentage of the total bill to give as tip.

Value

A vector displaying the final bill after taxes and after tip.

Examples

1
2
PriceBC("Sale", PriceTag = 50)
PriceBC("Restaurant", MealBill = 35, AlcoholBill = 67, Tip = 18)

hans-ghezzi/bills documentation built on Dec. 20, 2021, 2:48 p.m.