Skip to content
Search
Generic filters
Exact matches only

A/B Testing in R. What is A/B Testing? | by Sheenal Srivastava | Aug, 2020

Analytics to measure user experience

Sheenal Srivastava
merge_1<-merge(variations_df,visits_df,by.x="user_id",by.y="user_id")  
merge_2<-merge(merge_1,test_conv_df,by.x="user_id",by.y="user_id",all.x=TRUE)
merge_3<-merge(merge_2,eng_df,by.x="user_id",by.y="user_id",all.x=TRUE)
merge_3$converted<-if_else(is.na(merge_3$converted),0,1)  
merge_3$clicked_on_email<-if_else(is.na(merge_3$clicked_on_email),0,1)
merge_3$converted<-as.factor(merge_3$converted)
merge_3$clicked_on_email<-as.factor(merge_3$clicked_on_email)
merge_3$timeofday<-  mapvalues(hour(merge_3$visit_time),from=c(0:23),  
to=c(rep("night",times=5), rep("morning",times=6),rep("afternoon",times=5),rep("night", times=8)))
merge_3$timeofday<-as.factor(merge_3$timeofday)