Ggplot( HighNote_Data_Midterm, aes( x = adopternew, y = subscriber_friend_cnt, fill = males)) +
P =ggplot( HighNote_Data_Midterm, aes( x = adopternew, y = subscriber_friend_cnt, color = adopternew)) + HighNote_Data_Midterm $ males = as.factor( HighNote_Data_Midterm $ male) HighNote_Data_Midterm $ adopternew = as.factor( HighNote_Data_Midterm $ adopter) # Convert the variable adopter from a numeric to a factor variable Theme( = element_text( angle = 65, vjust = 0.6)) Subtitle = "Age vs subscriber_friend_cnt ", Ggplot( HighNote_Data_Midterm, aes( x = age, y = subscriber_friend_cnt)) + Labs( subtitle = "Male vs subscriber_friend_cnt ", G + geom_count( col = "pink ", show.legend = F) + G = ggplot( HighNote_Data_Midterm, aes( male, subscriber_friend_cnt)) G = ggplot( HighNote_Data_Midterm, aes( age, playlists)) Title = "Scatterplot with overlapping points ", G = ggplot( HighNote_Data_Midterm, aes( age, shouts)) Ggplot( HighNote_Data_Midterm, aes( tenure)) + geom_density(aes( fill = factor( adopter)), size = 2) + labs( title = "Density plot ") Labs( subtitle = "Tenure Vs Song listened ", Geom_smooth( method = "loess ", se = F) + Geom_point(aes( col = adopter, size = age )) + Gg = ggplot( HighNote_Data_Midterm, aes( x = tenure, y = songsListened)) + Theme_set(theme_bw()) # pre-set the bw theme. Options( scipen = 999) # turn-off scientific notation like 1e+48 #We calculate the descriptive statistics for the adopter group #We calculate the descriptive statistics for the non adopter group Non_adopter_samples = filter( HighNote_Data_Midterm, adopter = 0)Īdopter_samples = filter( HighNote_Data_Midterm, adopter = 1) #we sample the data based on adopters and non adopters HighNote_Data_Midterm_original = HighNote_Data_Midterm
HighNote_Data_Midterm = read.csv( "HighNote Data Midterm.csv ") Setwd( "C:/Users/Daniela Orovwiroro/Documents/Cust and social analytics ")