Skip to contents

Filters from the dataset the orders that have been delivered, and removes those that have been cancelled. It does so by using the specified tracking variable, defaulting to "tracking_status", that is present in Delivraide data.

Usage

filter_delivered(df, col_name = tracking_status)

Arguments

df

A dataframe of Delivraide orders

col_name

The column to use for filtering (default: tracking_status). Note: do not add quotes around the column name.

Value

The input dataframe filtered to only include orders that have been delivered.

Examples

# Load the sample orders data
data(sample_orders_data)

# Filter the delivered orders
delivered_orders <- filter_delivered(sample_orders_data)