examples inspired by this book
examples inspired by this book
| library(survival) | |
| library(ggplot2) | |
| library(scales) | |
| d.survfit <- survival::survfit(survival::Surv(time, status) ~ sex, | |
| data = lung) | |
| fortify.survfit <- function(survfit.data) { | |
| data.frame(time = survfit.data$time, |
| library(htmltools) | |
| addUIDep <- function(x) { | |
| jqueryUIDep <- htmlDependency("jqueryui", "1.10.4", c(href="shared/jqueryui/1.10.4"), | |
| script = "jquery-ui.min.js", | |
| stylesheet = "jquery-ui.min.css") | |
| attachDependencies(x, c(htmlDependencies(x), list(jqueryUIDep))) | |
| } |
| # sql.export.rf(): save a randomForest model as SQL | |
| # v0.04 | |
| # Copyright (c) 2013-2014 Shane Butler <shane dot butler at gmail dot com> | |
| # | |
| # sql.export.rf is free software: you can redistribute it and/or modify it | |
| # under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation, either version 2 of the License, or | |
| # (at your option) any later version. | |
| # | |
| # sql.export.rf is distributed in the hope that it will be useful, but |
| library(shiny) | |
| library(datasets) | |
| Logged = FALSE; | |
| PASSWORD <- data.frame(Brukernavn = "withr", Passord = "25d55ad283aa400af464c76d713c07ad") | |
| # Define server logic required to summarize and view the selected dataset | |
| shinyServer(function(input, output) { | |
| source("www/Login.R", local = TRUE) | |
| observe({ | |
| if (USER$Logged == TRUE) { |
| # sql.export.gbm(): save a GBM model as SQL | |
| # v0.11 | |
| # Copyright (c) 2013-2014 Shane Butler <shane dot butler at gmail dot com> | |
| # | |
| # sql.export.gbm is free software: you can redistribute it and/or modify it | |
| # under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation, either version 2 of the License, or | |
| # (at your option) any later version. | |
| # | |
| # sql.export.gbm is distributed in the hope that it will be useful, but |
| data_sets <- c("mtcars", "morley", "rock") | |
| shinyServer(function(input, output) { | |
| # Drop-down selection box for which data set | |
| output$choose_dataset <- renderUI({ | |
| selectInput("dataset", "Data set", as.list(data_sets)) | |
| }) | |
| # Check boxes |