March 2019
Beginner to intermediate
464 pages
10h 57m
English
It might be true that certain job categories tend to convert more frequently than others. Let's take a look at the conversion rates across different job categories. You can achieve this by running the following code:
conversionsByJob <- df %>% group_by(Job=job) %>% summarise(Count=n(), NumConversions=sum(conversion)) %>% mutate(ConversionRate=NumConversions/Count*100.0)
Let's take a more detailed look at this code. We first group by the column, job, which contains information about the job category that each customer belongs to. Then, we count the total number of customers in a given job category by using the n() function, and sum over the conversion column for each job category by using the sum function. Lastly, ...
Read now
Unlock full access