Commit 2d309763 authored by GAREL Marc's avatar GAREL Marc
Browse files

Change header for prediected data.frame, and add Smooth controller as numeric...

Change header for prediected data.frame, and add Smooth controller as numeric ranged [0,1] for smoothing and to have variable number of predicted data
parent f8767a44
...@@ -93,6 +93,7 @@ shinyServer( ...@@ -93,6 +93,7 @@ shinyServer(
# This will change the value of input$ymax, based on ymax # This will change the value of input$ymax, based on ymax
updateTextInput(session, "ymax", value = init_range_y()) updateTextInput(session, "ymax", value = init_range_y())
x <- rep(df[, 1], ncol(df) - 1) x <- rep(df[, 1], ncol(df) - 1)
y <- unlist(df[, 2:ncol(df)]) y <- unlist(df[, 2:ncol(df)])
crssce <- data.frame(y, x) crssce <- data.frame(y, x)
...@@ -101,8 +102,8 @@ shinyServer( ...@@ -101,8 +102,8 @@ shinyServer(
print(x) print(x)
print(y) print(y)
print(crssce) print(crssce)
w0 <- seq(0, max(x), as.numeric(input$test))
w0 <- seq(0, max(x), 1) print(w0)
coef <- getInitial(y ~ SSlogis(x, asym, xmid, scal), data = cbind.data.frame(x, y)) coef <- getInitial(y ~ SSlogis(x, asym, xmid, scal), data = cbind.data.frame(x, y))
mu <- 1 / coef[3] mu <- 1 / coef[3]
...@@ -120,10 +121,11 @@ shinyServer( ...@@ -120,10 +121,11 @@ shinyServer(
predict(q05b, newdata = list(x = w0)), predict(q05b, newdata = list(x = w0)),
predict(q95b, newdata = list(x = w0))) predict(q95b, newdata = list(x = w0)))
print(result) #print(result)
# changerle header des data calculated # changerle header des data calculated
colnames(result) = c("w0", "SSlogis", "q1b", "q3b", "q05b", "q95b") #colnames(result) = c("w0", "SSlogis", "q1b", "q3b", "q05b", "q95b")
colnames(result) = c("Theo_time", "Theo_data", "first_quartile", "third_quartile", "Inf_95_CI", "Sup_95_CI")
return(result) return(result)
}) })
...@@ -145,13 +147,13 @@ shinyServer( ...@@ -145,13 +147,13 @@ shinyServer(
ylim = c(as.integer(input$ymin), as.integer(input$ymax)), las = 1, pch = 22, bg = 1) ylim = c(as.integer(input$ymin), as.integer(input$ymax)), las = 1, pch = 22, bg = 1)
grid() grid()
lines(df$w0, df$SSlogis, lwd = 1.5) lines(df$Theo_time, df$Theo_data, lwd = 1.5)
lines(df$w0, df$q1b, col = "blue", lty=2) lines(df$Theo_time, df$first_quartile, col = "blue", lty=2)
lines(df$w0, df$q3b, col = "blue", lty=2) lines(df$Theo_time, df$third_quartile, col = "blue", lty=2)
lines(df$w0, df$q05b, col = "blue", lty=3) lines(df$Theo_time, df$Inf_95_CI, col = "blue", lty=3)
lines(df$w0, df$q95b, col = "blue", lty=3) lines(df$Theo_time, df$Inf_95_CI, col = "blue", lty=3)
}) })
......
...@@ -63,6 +63,7 @@ shinyUI( ...@@ -63,6 +63,7 @@ shinyUI(
textInput("xmax", "xmax", value = 100), textInput("xmax", "xmax", value = 100),
textInput("ymin", "ymin", value = 0), textInput("ymin", "ymin", value = 0),
textInput("ymax", "ymax", value = 100), textInput("ymax", "ymax", value = 100),
numericInput("test", "Smooth value ranged between 0 and 1 ", value = 1),
downloadButton("downloadDataParameters", "Download parameters"), downloadButton("downloadDataParameters", "Download parameters"),
downloadButton("downloadDataCalculated", "Download plot data") downloadButton("downloadDataCalculated", "Download plot data")
), ),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment