duplicates = multiple editions
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
| stratified <- function(df, group, size, select = NULL, | |
| replace = FALSE, bothSets = FALSE) { | |
| if (is.null(select)) { | |
| df <- df | |
| } else { | |
| if (is.null(names(select))) stop("'select' must be a named list") | |
| if (!all(names(select) %in% names(df))) | |
| stop("Please verify your 'select' argument") | |
| temp <- sapply(names(select), | |
| function(x) df[[x]] %in% select[[x]]) |
| library(mgcv) | |
| #library(modules) #devtools::install_github(klmr/modules) | |
| #mgcv<-import_package("mgcv") | |
| mspline<-function(x,y,k=10,lower=NA,upper=NA){ | |
| #fits a monotonic spline to data | |
| #small values of k= more smoothing (flatter curves) | |
| #large values of k= more flexible (wiggly curves) | |
| #k is related to effective degrees of freedom and number of knots | |
| #use unconstrained gam to get rough parameter estimates |
| library(shiny) | |
| # Define server logic for random distribution application | |
| shinyServer(function(input, output) { | |
| # Reactive expression to generate the requested distribution. This is | |
| # called whenever the inputs change. The renderers defined | |
| # below then all use the value computed from this expression | |
| data <- reactive({ | |
| dist <- switch(input$dist, |