Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- channel_preferences <- c('Cust.Ch.Pref_2Chs_A.1_and_A.4.1', 'Cust.Ch.Pref_2Chs_A.1_and_B.3',
- 'Cust.Ch.Pref_2Chs_A.4.1_and_B.3', 'Cust.Ch.Pref_3Chs',
- 'Cust.Ch.Pref_Other', 'Cust.Ch.Pref_A.4.1',
- 'Cust.Ch.Pref_B.3')
- channel_preferences_length = c()
- channel_preferences_length[1] = nrow(subset(Student.Project.Data, Cust.Ch.Pref_2Chs_A.1_and_A.4.1==1))
- channel_preferences_length[2] = nrow(subset(Student.Project.Data, Cust.Ch.Pref_2Chs_A.1_and_B.3==1))
- channel_preferences_length[3] = nrow(subset(Student.Project.Data, Cust.Ch.Pref_2Chs_A.4.1_and_B.3==1))
- channel_preferences_length[4] = nrow(subset(Student.Project.Data, Cust.Ch.Pref_3Chs==1))
- channel_preferences_length[5] = nrow(subset(Student.Project.Data, Cust.Ch.Pref_Other==1))
- channel_preferences_length[6] = nrow(subset(Student.Project.Data, Cust.Ch.Pref_A.4.1==1))
- channel_preferences_length[7] = nrow(subset(Student.Project.Data, Cust.Ch.Pref_B.3==1))
- library(plotly)
- plot_ly(x=channel_preferences, y=channel_preferences_length, name="Channel Preferences", type="bar")
- layout(yaxis = list(title = 'Count'), margin=list(b=200))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement