The following dataframe contains data regarding a marketing campaign.
Sl No Success_Percentage communication_type Message
1 35.46666667 email Hello, Buy New Product
2 32.32830821 email Hi Buy New Product
3 22.9226361 SMS Hello World
4 21.88888889 SMS Hello, Buy New Product
5 40.04085802 FB Hi Buy New Product
6 38.7283237 FB Hello World
I wish create a table as follows.
Success_Percentage communication_type Message
22.9226361 SMS Hello World
21.88888889 SMS Hello, Buy New Product
35.46666667 email Hello, Buy New Product
32.32830821 email Hi Buy New Product
40.04085802 FB Hi Buy New Product
38.7283237 FB Hello World
I Have used dplyr package to achieve subsets.
require(dplyr)
dataframe%>%
group_by(communication_type, Message)
summarise_all(order(Success_Percentage))
I am unable to obtain the above output. Note that Success % is randomly mixed(not in linear order as here) I am unable to get the desired output.