DAT 301 Lab 3 DAT 301 Lab 3 In this lab you need to create a shiny app. Naturally, you would need to install shiny package. You can either create ui.R and server.R files, or just one .R file with both...

1 answer below »
I need this assignment (Lab3.pdf) done in about 3 hours or so. Please check the requirements in lab3 and change the code in the R file accordingly that it does not look plagiarised. I need almost the same sort of output, so provide me the R file back and I will plug the code in my shiny app account once done. All you need to do is redo the R file in a way that all the requirements are met as well as it's plagiarism-free.



DAT 301 Lab 3 DAT 301 Lab 3 In this lab you need to create a shiny app. Naturally, you would need to install shiny package. You can either create ui.R and server.R files, or just one .R file with both UI and server codes in it. Requirements • The app should be about some statistics topic or technique of your choice (for example: regression with various data sets, simulation of various probability distributions, confidence and prediction bands in regression, etc.). • At least two different kinds of GUI components/widgets must be included (slider, checkbox, table, tabs, menubar/selectbar, radio button, submit button, etc.) • Must include an interactive plot (you can use base plot, ggplot, or (3D) plotly) What to Submit and Where • In Canvas, you need to submit all the files necessary for your shiny app to run, so the grader can run your app. • You also need to submit in Canvas a pdf file explaining what your shiny app does, what its features are AND include the link to your app at www.shinyapps.io (see below). The description of your app doesn’t have to be detailed, especially if it is clear from the plot. If, however, your app has some interesting feature that is not obviously visible upon opening the app, you may want to point that out and explain it. This pdf file could be created, for example, using an Rmd file, but it is not required. • In addition to submission in Canvas, you need to upload your shiny app to https://www.shinyapps.io. Open an account there. It’s free for uploading up to 5 apps and for total run time of 25 hours per month. Use any credentials of your choice (NOT ASU credentials). These credentials (username and password) will not be known to me or the grader. Also, since this website is public, your shiny app will be visible to the whole world. However, it does NOT need to have any indication which could relate the app with you, nor our class, nor ASU. Upon opening account at https://www.shinyapps.io, to upload your app, go to Dashboard tab (if you are not already there) and follow the instructions given in the three steps. As you can see there, you will need to install rsconnect package. The 3rd step (DEPLOY), tells you to run library(rsconnect) rsconnect::deployApp('path/to/your/app') If your app consists of two files (ui.R and server.R), the app part in the address is the name of the folder where these two files are. If you are in Windows and you copy-paste the path, you need to change backslashes to forwardslashes in your address. Check whether it works on this webpage, and copy the link to the pdf file which you need to submit to Canvas. The grader will open your pdf file in Canvas and click on this link for grading. Keep in mind: your username and password in shinyapps.io webpage are of your own choice, and are unknown to us. Later, if you get interviews for jobs, you can use your shinyapps.io webpage to show to prospective employers (or your boss if you seek a promotion) what you can do in R, which is the main purpose of this lab. IMPORTANT: Don’t forget to include in your pdf file the corresponding link to your app at shinyapps.io. Apart from examples of shiny apps in Canvas, you can also go to shiny gallery and see a lot of cool apps, or you can run the following examples in you RStudio console. library(shiny) runExample("01_hello") # a histogram runExample("02_text") # tables and data frames 1 https://www.shinyapps.io https://www.shinyapps.io https://shiny.rstudio.com/gallery/ runExample("03_reactivity") # a reactive expression runExample("04_mpg") # global variables runExample("05_sliders") # slider bars runExample("06_tabsets") # tabbed panels runExample("07_widgets") # help text and submit buttons runExample("08_html") # Shiny app built from HTML runExample("09_upload") # file upload wizard runExample("10_download") # file download wizard runExample("11_timer") # an automated timer IMPORTANT! Copying a file/shiny app from someone or from some webpage is cheating and violates academic integrity! Also, this is NOT a group work, two students CANNOT have the same lab, i.e. the same shiny app. Copying a file/shiny from other student or a webpage automatically results in the score of 0 pts, and other possible sanctions include, but are not limited to: course failure (indicated on the transcript as a grade of E), course failure due to academic dishonesty (indicated on the transcript as a grade of XE), loss of registration privileges, disqualification and dismissal. For more information, please see http://provost.asu.edu/academicintegrity. 2 http://provost.asu.edu/academicintegrity Requirements What to Submit and Where IMPORTANT! # # This is a Shiny web application. You can run the application by clicking # the 'Run App' button above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # library(shiny) library(ggplot2) library(plotly) library(rmarkdown) library(knitr) library(pander) # Define UI for application that draws a histogram ui <- fluidpage(="" #="" application="" title="" titlepanel("statistics="" 202="" -="" simple="" linear="" regression"),="" h4(tags$a(href="https://www.antoinesoetewey.com/" ,="" "antoine="" soetewey")),="" withmathjax(),="" sidebarlayout(="" sidebarpanel(="" tags$b("data:"),="" textinput("x",="" "x",="" value="90, 100, 90, 80, 87, 75" ,="" placeholder="Enter values separated by a comma with decimals as points, e.g. 4.2, 4.4, 5, 5.03, etc." ),="" textinput("y",="" "y",="" value="950, 1100, 850, 750, 950, 775" ,="" placeholder="Enter values separated by a comma with decimals as points, e.g. 4.2, 4.4, 5, 5.03, etc." ),="" hr(),="" tags$b("plot:"),="" checkboxinput("se",="" "add="" confidence="" interval="" around="" the="" regression="" line",="" true),="" textinput("xlab",="" label="Axis labels:" ,="" value="x" ,="" placeholder="x label" ),="" textinput("ylab",="" label="NULL," value="y" ,="" placeholder="y label" ),="" hr(),="" #="" textinput("pred",="" "prediction="" of="" y="" when="" x=", value = " 100,="" 110,="" 100,="" 90,="" 97,="" 85",="" placeholder="Enter values separated by a comma with decimals as points, e.g. 4.2, 4.4, 5, 5.03, etc." ),="" #="" hr(),="" radiobuttons("format",="" "download="" report:",="" c("html",="" "pdf",="" "word"),="" inline="TRUE" ),="" checkboxinput("echo",="" "show="" code="" in="" report?",="" false),="" downloadbutton("downloadreport"),="" hr(),="">

Report a
bug
or view the
code. Back to
www.antoinesoetewey.com.

'), hr(), HTML('
Licence Creative Commons

Cette oeuvre de

RShiny@UCLouvain

est mise à disposition selon les termes de la
licence Creative Commons Attribution 2.0 Belgique. Détails sur l\'utilisation de cette ressource sur

RShiny@UCLouvain
. Code source disponible sur
GitHub.') ), mainPanel( tags$b("Your data:"), DT::dataTableOutput("tbl"), br(), uiOutput("data"), br(), tags$b("Compute parameters by hand:"), uiOutput("by_hand"), br(), tags$b("Compute parameters in R:"), verbatimTextOutput("summary"), br(), tags$b("Regression plot:"), uiOutput("results"), plotlyOutput("plot"), br(), tags$b("Interpretation:"), uiOutput("interpretation"), br(), br() ) ) ) server <- function(input,="" output)="" {="" extract=""><- function(text)="" {="" text=""><- gsub("="" ",="" "",="" text)="" split=""><- strsplit(text,="" ",",="" fixed="FALSE)[[1]]" as.numeric(split)="" }="" #="" data="" output="" output$tbl=""><- dt::renderdatatable({>
Answered Same DaySep 26, 2021

Answer To: DAT 301 Lab 3 DAT 301 Lab 3 In this lab you need to create a shiny app. Naturally, you would need to...

Swapnil answered on Sep 26 2021
137 Votes
92050/Shiny Applicaiton Using Regression/Document.txt
Created By - Jeshal Patel
Date : 26/09/2021
This is a Shiny web application. You can run the applicati
on by clicking the 'Run App' button above.
Find out more about building applications with Shiny here:
http://shiny.rstudio.com/
92050/Shiny Applicaiton Using Regression/Server.R
# Created By - Jeshal Patel
# Date : 26/09/2021
# This is a Shiny web application. You can run the application by clicking the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
library(shiny)
library(corrplot)
Server <- (function(input, output) {
thedata <- reactive({
rawdata <- mtcars
thedata <- data.frame(rawdata[,c("mpg",input$Predictors)])
})
model <- reactive({
multRegress(thedata())
})
thedata.cor <- reactive({
corr <- round(cor(thedata()),3)
corr <- corrplot(corr, method="circle")
})
raw.cor <- reactive({
round(cor(thedata()),3)
})
output$summary <- renderPrint({
summary(thedata())
})
output$corr_csv <- downloadHandler(
filename = function() {
paste(input$Dependent, "_Corr.csv", sep="")
},
content = function(correl) {
a <- raw.cor()
write.csv(a, correl)
})
output$corr <- renderPlot({
thedata.cor()
})
output$model <- renderPrint({
model()
result
})
output$rsquare <- renderText({
model()
paste("R2=",round(rsquare,3))
})
output$report <- downloadHandler(
filename = function() {
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here