clean: Combine cleaning functions

Description Usage Arguments Value

View source: R/clean.R

Description

Use unit prices and conversion factors to complete missing quantity data. Handle unit prices that are out of bound. Add quantity estimates reported by the trade partner. The outcome is returned as a data frame.

Usage

1
2
3
clean(dtf, replacebypartnerquantity = TRUE, shaveprice = TRUE,
  addmissingmirrorflow = TRUE, outputalltables = FALSE,
  includeqestimates = TRUE)

Arguments

dtf

data frame

replacebypartnerquantity,

when TRUE call replacebypartnerquantity()

shaveprice

when TRUE, call shaveprice()

outputalltables

when TRUE return a list of data frames containing the cleaned dataset and all tables used to compute it conversion factors, regional unit prices, choice between reporter and partner flows

deleteextracolumns

when TRUE, keep only columns from column_names$validated_flow

Value

data frame with the same information as the original data frame. With columnes added by the various clean functions.


paul4forest/tradeflows documentation built on Oct. 8, 2019, 10:35 a.m.