This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diffogram(ms6) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ms6 <- lsmeans(model_mieszany, | |
| pairwise~ typ*traktowanie, | |
| adjust="tukey") | |
| # $lsmeans | |
| # Group lsmean SE df lower.CL upper.CL | |
| # condition 1 -0.2208147 0.02642544 14.22 -0.2774102 -0.1642192 | |
| # condition 2 -0.3123998 0.02628429 14.06 -0.3687533 -0.2560464 | |
| # condition 3 -0.3500326 0.02688922 14.71 -0.4074429 -0.2926222 | |
| # condition 4 -0.3249601 0.02589164 13.06 -0.3808715 -0.2690487 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| model_mieszany <- lmer(kolec ~ typ*traktowanie + | |
| (1|zwierze:typ) + | |
| (1|zwierze:typ:skrawek) + | |
| (1|zwierze:typ:skrawek:zdjecie), | |
| data=dane) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(shiny) | |
| library(PogromcyDanych) | |
| # wykonywane raz gdy uruchamiana jest plikacja | |
| serialeIMDB$sezon <- paste(serialeIMDB$sezon, serialeIMDB$odcinek, sep="/") | |
| shinyServer(function(input, output) { | |
| # reużywalny fragment | |
| dane <- reactive({ | |
| serialeIMDB[serialeIMDB$serial == input$serial, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(PogromcyDanych) | |
| library(ca) | |
| contingency <- table(auta2012$Kolor, auta2012$Marka) | |
| # tylko kolory i marki, dla których jest przynajmenij 500 ofert sprzedaży | |
| tab <- contingency[rowSums(contingency) > 500, colSums(contingency) > 500] | |
| plot(ca(tab), arrows = c(TRUE, FALSE)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| auta2012[auta2012$KM > 500,"Kolor"] %>% | |
| table() %>% | |
| sort() %>% | |
| tail(1) | |
| ## czarny-metallic | |
| ## 179 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| auta2012 %>% | |
| filter(Kolor!="") %>% | |
| group_by(Kolor, Rok.produkcji) %>% | |
| summarise(median_KM = quantile(KM, 0.9, na.rm=T), | |
| count = n()) %>% | |
| filter(count>20) %>% | |
| group_by(Rok.produkcji) %>% | |
| arrange(-median_KM) %>% | |
| slice(1) %>% | |
| group_by() %>% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| auta2012 %>% | |
| group_by(Kolor) %>% | |
| summarise(mKM = quantile(KM, .9, na.rm=TRUE)) %>% | |
| arrange(-mKM) %>% | |
| slice(1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(PogromcyDanych) | |
| auta2012 %>% | |
| group_by(Kolor) %>% | |
| summarise(mKM = median(KM, na.rm=T)) %>% | |
| arrange(-mKM) %>% | |
| slice(1) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| labs <- function(data){ | |
| if(is.null(data)) return(NULL) | |
| paste0("<b>",data$name, "</b><br/> ", data$x, " <br/>", data$y,"") | |
| } | |
| abline_data <- function (domain, intercept, slope) { | |
| data.frame(x = domain, y = domain * slope + intercept) | |
| } | |
| layer_abline <- function (.vis, domain, intercept = 0, slope = 1, dash = 6, ...) { | |
| df <- abline_data(domain, intercept, slope) |