Guest User

Untitled

a guest
Jan 2nd, 2016
353
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. load("allRes.rda")
  2.  
  3. dat <- data.frame(
  4.   rbind(
  5.     cbind("Kadencja VII",substr(unlist(allRes7), 1, 2))
  6.     ,
  7.     cbind("Kadencja VIII",substr(unlist(allRes8), 1, 2))
  8.   )
  9. )
  10. names(dat) <- c("kadencja","godzina")
  11.  
  12. dat$godzina <- as.numeric(levels(dat$godzina))[dat$godzina]
  13.  
  14. if(!require(ggplot2)){
  15.   install.packages("ggplot2")
  16. }
  17. library(ggplot2)
  18.  
  19. # Interleaved histograms
  20. ggplot(dat, aes(x=godzina, fill=kadencja)) +
  21.   geom_histogram(binwidth=.5, position="dodge")
  22.  
  23. # Density plots with semi-transparent fill
  24. ggplot(dat, aes(x=godzina, fill=kadencja)) + geom_density(alpha=.3)
  25.  
  26. # With flipped axes
  27. ggplot(dat, aes(x=kadencja, y=godzina, fill=kadencja)) + geom_boxplot() +
  28.   guides(fill=FALSE) + coord_flip() + stat_summary(fun.y=mean, geom="point", shape=5, size=4)
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×