library(shiny)
library(DT)
library(shinydashboard)
library(ggplot2)
library(shinythemes)
library(dplyr)
library(zoo)
library(markdown)
source("dataTable.R")colnames<-c("Scan","Tiempo","Global","Difusa","Directa1","Directa2",
"DFRCen_V","DFRCen_T","Cli_V3","Cli_V2","Cli_V1","BAR")
conf<-checkboxGroupInput('columnas',"Escoge las columnas de la tabla",
choices=colnames,selected=colnames[-c(1,9,10)])
alphacen<-numericInput("alphacen",label=h5(strong("Alpha CENER")),
value=0.00015,step=0.00001,width='80%')
alphacli<-numericInput("alphacli",label=h5(strong("Alpha Cliente")),
value=0.0000,step=0.00001,width='80%')
clit<-numericInput("clit",label=h5(strong("Temperatura de la celula del cliente")),
value=25,step=0.25,width='80%')shinyUI(fluidPage(
dashboardPage(
dashboardHeader(),
dashboardSidebar(
sidebarMenu(
csvFileInput("datafile", "User data (.csv format)"),
menuItem(strong("Dia 1"),tabName="dia1")
)
),
dashboardBody(
tabItems(
tabItem(tabName="dia1",
tabsetPanel(
tabPanel("Configuracion",icon=icon("cog"),
column(width=4,
box(conf,width=NULL,status="warning")),
column(width=4,
box(clit,width=NULL,status="warning")
),
column(width=4,
box(alphacli,width=NULL,status="warning"),
box(alphacen,width=NULL,status="warning")
)),
tabPanel("Datos",icon=icon("table"),
dataTableOutput("tb")),
tabPanel("Salida dia",icon=icon("area-chart"),
column(width=12,
box(title=strong("Gt-Tiempo"),solidHeader=FALSE,
status="success",collapsible=TRUE,
plotOutput("g1",height=200))
))
)
)
))
))
)
library(shiny)
library(DT)
library(shinydashboard)
library(ggplot2)
library(dplyr)
library(zoo)
source("dataTable.R")colnames<-c("Scan","Tiempo","Global","Difusa","Directa1","Directa2",
"DFRCen_V","DFRCen_T","Cli_V3","Cli_V2","Cli_V1","BAR")
conf<-checkboxGroupInput('columnas',"Escoge las columnas de la tabla",
choices=colnames,selected=colnames[-c(1,9,10)])
alphacen<-numericInput("alphacen",label=h5(strong("Alpha CENER")),
value=0.00015,step=0.00001,width='80%')
alphacli<-numericInput("alphacli",label=h5(strong("Alpha Cliente")),
value=0.0000,step=0.00001,width='80%')
clit<-numericInput("clit",label=h5(strong("Temperatura de la celula del cliente")),
value=25,step=0.25,width='80%')shinyServer(function(input, output, session) {
datafile<-callModule(csvFile,"datafile")
output$tb<-renderDataTable({
DT::datatable(datafile() %>%select_(.dots=input$columnas),
extensions='FixedColumns',
options=list(searching=FALSE,
lengthMenu=list(c(10,25,50,-1),
c('10','25','50','Todo')),
autoWidth=TRUE,scrollX=400,
scrollY=400,fixedColumns=3
))
})
grafica1<-reactive({
df<-datafile()
Gt<-((df$Difusa)+(df$Directa1))
df<-mutate(df,valido=(df$Difusa/Gt>0.1)&(df$Difusa/Gt<0.3)&(Gt>800)&(Gt<1200))
g1<-qplot(df$Tiempo,Gt,data=df,col=as.factor(valido))+
geom_point()+xlab("Tiempo")+ylab("Gt")
g1<-g1+geom_smooth(method='lm')
g1
})
output$g1<-renderPlot({
grafica1()
})
})
<< dataTable.R >>
--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/82b8c630-aa4a-40d3-9237-7fa6c5f0fd3e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
library(shiny)
library(DT)
library(shinydashboard)
library(ggplot2)
library(shinythemes)
library(dplyr)
library(zoo)
library(markdown)
source("dataTable.R")
source("plotmodule.R")
source("plotmodule.R")
colnames<-c("Scan","Tiempo","Global","Difusa","Directa1","Directa2",
"DFRCen_V","DFRCen_T","Cli_V3","Cli_V2","Cli_V1","BAR")
conf<-checkboxGroupInput('columnas',"Escoge las columnas de la tabla",
choices=colnames,selected=colnames[-c(1,9,10)])
alphacen<-numericInput("alphacen",label=h5(strong("Alpha CENER")),
value=0.00015,step=0.00001,width='80%')
alphacli<-numericInput("alphacli",label=h5(strong("Alpha Cliente")),
value=0.0000,step=0.00001,width='80%')
clit<-numericInput("clit",label=h5(strong("Temperatura de la celula del cliente")),
value=25,step=0.25,width='80%')
shinyServer(function(input, output, session) {
datafile<-callModule(csvFile,"datafile")
callModule(plotModule, "grafica1", datafile)
output$tb<-renderDataTable({
DT::datatable(datafile() %>%select_(.dots=input$columnas),
extensions='FixedColumns',
options=list(searching=FALSE,
lengthMenu=list(c(10,25,50,-1),
c('10','25','50','Todo')),
autoWidth=TRUE,scrollX=400,
scrollY=400,fixedColumns=3
))
})
plotModule<-function(input,output,session,datafile){ datafile<-callModule(csvFile,"datafile")
grafica1<-reactive({
g1<-plot(x=datafile$Tiempo,y=datafile$Global)
g1
})
return(grafica1)
}
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/87997cc5-0b12-45ce-9475-1ac4afcd0ed9%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/8ff44753-81c4-4b0e-8aa1-cce1eeb25f4f%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/4d74de53-366a-4d92-a8c4-655da45612c7%40googlegroups.com.