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
| setwd("~/Dropbox/Projekt Akcelerometr/") | |
| library(ggplot2) | |
| library(lubridate) | |
| read.table("2015-01-20_09-50-28.csv", h=T, sep=",") -> marsz | |
| read.table("2015-01-26_12-32-02.csv", h=T, sep=",") -> schody | |
| read.table("2015-01-26_20-43-38.csv", h=T, sep=",") -> skoki | |
| marsz$loggingTime <- ymd_hms(marsz$loggingTime) |
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(pheatmap) | |
| library(tidyr) | |
| library(RColorBrewer) | |
| library(SmarterPoland) | |
| country_jumper_points <- skiJumps2013 %>% | |
| mutate(jumper = paste(jumperSurname, jumperName)) %>% | |
| group_by(jumper, compName) %>% | |
| summarise(max.points = sum(classPoints, na.rm=TRUE)) %>% | |
| group_by(jumper) %>% |
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
| heatmap(as.matrix(country_jumper_points)) | |
| pheatmap(country_jumper_points, | |
| main="Where they've got points") | |
| pheatmap(country_jumper_points, border="white", | |
| color = brewer.pal(9,"Blues"), | |
| main="Where they've got points") |
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
| ## ui.R | |
| library(shiny) | |
| shinyUI(fluidPage( | |
| textInput(inputId = "imie", | |
| label = "Zaznacz imiona", | |
| value = ""), | |
| plotOutput("choinka", width=720, height=720) | |
| ) | |
| ) |
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
| ## server.r | |
| library(ggplot2) | |
| library(scales) | |
| library(Cairo) | |
| library(ggthemes) | |
| library(shiny) | |
| load("dzch.rda") | |
| zielonaChoinka <- function() { |
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
| # install_github("amplab-extras/SparkR-pkg", | |
| # subdir="pkg") | |
| library(SparkR) | |
| # you need to have a properly configured Spark installation | |
| sc <- sparkR.init() | |
| # read data from local disk | |
| linesRDD <- textFile(sc, "data.txt") |
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(PISA2012lite) | |
| pol <- student2012[student2012$CNT == 'Poland',] | |
| model <- lm(cbind(PV1MATH, PV1READ, PV1SCIE)~ST28Q01+ST04Q01, pol) | |
| # jeżeli nie jest zainstalowany to | |
| # install.packages("heplots") | |
| library(heplots) | |
| heplot(model, size="effect.size", las=1, term.labels=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
| library(PISA2012lite) | |
| pol <- student2012[student2012$CNT == "Poland",] | |
| model <- lm(cbind(PV1MATH, PV1READ, PV1SCIE)~ST28Q01+ST04Q01, pol) |
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(candisc) | |
| model2 <- candisc(model, "ST28Q01") | |
| heplot(model2) |
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
| model3 <- candisc(model, "ST04Q01") | |
| heplot(model3) |