Advertisement
Guest User

Untitled

a guest
May 19th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 0.72 KB | None | 0 0
  1. # Creamos nuevo dataframe para poder mostrar mejor el gráfico ensenando la corelacion entre resolucion y ctr
  2. res_data <- all_data[,c('Label', 'resolution')]
  3. res_data$Label <- as.factor(res_data$Label)
  4. res_data$resolution <- as.factor(res_data$resolution)
  5. res_data<-res_data[!is.na(res_data$Label),]
  6. res_data<-res_data[!is.na(res_data$resolution),]
  7.  
  8. #Graficamos
  9. ggplot(res_data, aes(x=res_data$resolution, fill = Label)) +
  10.   theme_bw() +
  11.   geom_bar() +
  12.   scale_fill_discrete(labels = c("Did not click", "Clicked")) +
  13.   coord_cartesian(ylim = c(0,210000)) +  #xlim = c(0,65),
  14.   labs(y = "Count of people",
  15.        x = "Resolution of an ad (in pixels)",
  16.        title = "Conversion rate according to resolution of ad (detail)")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement