Commit d9adb2c3 authored by Yifang Zhang's avatar Yifang Zhang
Browse files

init upload

parents
This diff is collapsed.
Hi Yifang,
Thanks for your enthusiasm for work.
I have discussed with HR, Seid and Neil and get an agreement on your project assignment.
To avoid potentially sensitive issues, we think you should temporarily leave the P66 project. We would like you to learn R-Shiny during the time you are in China. We hope you can accumulate some experience on building GUI for R applications. One advantage of doing this project is, after installing R and R-Shiny on your laptop, you can do this work independently without internet and without the remote interaction with the group.
At least 4 GUIs you can start working on:
(1) User interface before calling R model-building program. The interface should allow users to enter the data set location, the value of parameters, the Determine variable and Non-Determine variables, and the model type (classification or regression). The interface should provide a button to trigger an R-program and build a model.
(2) User interface before applying a new test sample to a previous built model. The test sample may come from a file or may be inputted by user manually. In the latter case, the interface should have multiple fields to collect values on each variable. After all inputs are available, the test sample should be fed into an available model and generate a predictive value.
(3) User interface to show the result of the newly built model which includes statistics measurements, list of the predictive values, and error ratio.
(4) User interface to show the predictive results after applying a previous built model for the given testing samples.
I envision this R-Shiny application is a generic tool which can be used in many projects including P66.
Francis is good on R-Shiny, but he is leaving in July. We have to develop this skill in our group. I have some of Francis' source code, if you are interested in this project, I'll send his code to you. You can first work on some publicly available data set, such as Wine data set and Iris data set. After you come back, you can apply it to P66.
HR's Emily is preparing a MOU (memorandum of understanding) for you which will explain the NCSA policy on remote work.
Please let me know if I can do something to help.
Good luck.
Dora
\ No newline at end of file
rm(list=ls())
setwd("~/Desktop/Shiny/Shiny_GUI/")
library(shiny)
df <- read.csv("BostonHousing.csv")
field_names <- colnames(df)
source("playgroundUI.R")
source("playgroundServer.R")
# Create Shiny app ----
shinyApp(ui = ui, server = server)
library(shiny)
# Define server logic required to plot various variables against mpg
server <- shinyServer(function(input, output) {
#print(input$variable)
#formulaText <- reactive({
# paste("prediction variable: ", input$variable)
#})
output$predicitonData <- renderText({
"Prediction: "
})
output$predictionTable <- renderTable({
head(subset(df, select = c(input$variable)), 10)
})
output$variableData <- renderText({
"Selected Variables: "
})
output$variableTable <- renderTable({
head(df[, !names(df) %in% c(input$variable)] , 10)
})
})
\ No newline at end of file
library(shiny)
# Define UI for miles per gallon application
ui <- shinyUI(pageWithSidebar(
# Application title
headerPanel("Shiny Playground"),
sidebarPanel(
selectInput(inputId = "variable",
label = "Variable:",
choices = field_names),
checkboxInput("outliers", "Show outliers", FALSE)
),
mainPanel(
h4(textOutput("predicitonData")),
tableOutput("predictionTable"),
h4(textOutput("variableData")),
tableOutput("variableTable")
)
))
\ No newline at end of file
Supports Markdown
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