Description Usage Arguments Details Value Examples
View source: R/transform_shipments.R
Does some calculations involving Profit per shipment and adds them to the shipments data file. Some minor changes are also done.
1 | transform_shipments(products, shipments)
|
products |
Data frame, from the products_in_shipments.rds file |
shipments |
Data frame, from the shipments.rds file |
Modifies/ Cleans:
Arranges the data according to shipping date.
Adjusts the Sh.number
column.
Adds:
Price_all_items
, the total price of the items in a shipment
Profit_items
, the profit earned by each shipment
Profit_overall
, an overall profit after adjusting for stolen
cases
Returns the shipments data (a data frame) with the aforementioned modifications.
1 2 3 | products <- readRDS('./Data/Main_data/products_in_shipments.rds')
shipments <- readRDS('./Data/Main_data/shipments.rds')
transformed_shipments_data <- transform_shipments(products, shipments)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.