transform_customers: Modify the customers data.

Description Usage Arguments Details Value Examples

View source: R/transform_customers.R

Description

Adds customer history to the customers data by joining the 4 data sets. Cleans some variables and also makes some new ones.

Usage

1
transform_customers(customers, customers_styles, address, income)

Arguments

customers

Data frame, from the customers.rds file

income

Data frame, from the median_income_by_zipcode.csv file

customer_styles

Data frame, from the customers_styles.rds file

addresses

Data frame, from the addresses.rds file

Details

Modifies/ Cleans:

Adds:

Value

Returns the customers data (a data frame) with the aforementioned modifications.

Examples

1
2
3
4
5
6
customers = readRDS('Data/Main_data/customers.rds')
customer_styles <- readRDS('Data/Main_data/customer_styles.rds')
addresses <- readRDS('Data/Main_data/addresses.rds')
income <- read.csv('Data/Auxiliary_data/median_income_by_zipcode.csv')
transformed_customers_data <- transform_customers(customers, customer_styles,
                                                  addresses, income)

shahreyar-abeer/nadinewestr documentation built on May 27, 2019, 1:06 a.m.