Rstudio Tutorial: developing a web application with Shiny package
Vložit
- čas přidán 12. 10. 2014
- This tutorial provides a simple, step by step guide to develop a web application from scratch using Rstudio. Rstudio+Shiny enables you to conduct statistical analyses by R and share it as an interactive HTML page.
I actually wrote it like this ( if you only want to use 1 script)
library(shiny)
ui
TYSM !!!!
Creating web apps with RShiny clicked in my head when I saw this video, and I'm going to say it was because of the quality teaching. Great vid!
Thanks for the tutorial. It worked for me but I reached some difficulties at some point. Here is the code which worked for me.
After setting my working directory, I made two files; ui.R & Server.R.
The User Interface file contained:
library(shiny)
shinyUI(
pageWithSidebar(
headerPanel("My First Shiny App"),
sidebarPanel(
selectInput("Distribution", "Please Select Distribution Type",
choices = c("Normal", "Exponential")),
sliderInput("sampleSize", "Please select sample size",
min = 100, max = 5000, value = 1000, step = 100),
conditionalPanel(condition = "input.Distribution == 'Normal'",
textInput("mean", "Please select the mean", 10),
textInput("sd", "Please select the Standard Deviation", 3)),
conditionalPanel(condition = "input.Distribution == 'Exponential'",
textInput("Lamda", "Please select Exponential Lamda", 1))),
mainPanel(
plotOutput("myPlot")
)
)
)
The Server file contained:
library(shiny)
shinyServer(
function(input, output, session) {
output$myPlot
Thanks Daniel!
U are the man Daniel
Thank you for saving my time :)
Thank you very much !! I really appreciate your efforts.
You're awesome!
Fantastic intro to shiny. Thank you!
Great learning. Plz keep sharing such tutorials.
Thanks, nice intro to Shiny and Rstudio :-)
superub video man....good kick start with shiny
Good introduction to Shiny. Thanks for this!
Great simple video...
Great tutorial! I did really helped me to understand Shiny. Thanks!!!
Good tutorial to start with Shiny directly!
Thanks, very useful tutorial.
Thank you! It was incredibly helpful and straightforward
Nice tutorial, thank you!
Very nice presentation.u r covering so much of shiny codes in a small presentation😀
Very Nice Explanation..
Muchas gracias! me ha resultado muy práctico, saludos.-
Thank you for your video. It helps me a lot
Thanks Ehsan. It was an amazing tutorial.
What a remarkable package it is.....I just got rid of 1000 lines of painful code in HTML/PHP/Bootstrap......just make a simple DONUT chart !!!!
Thanks a lot, man!
great tutorial, thank you
Be aware that he switched the code in UI and Server. If you follow his steps, the code will not work. Read comments below before attempting to follow his tutorial.
Thanks for the heads up!
Thanks Rohit. I will go ahead and review the tutorial
I must add, Ehsan thank you for putting this tutorial together. It takes a lot of effort and time so **really** appreciate it.
Im still confused on how to fix it
Can you explain how he mixed it?
it helps a lot, thank youu som much🥺
I was watching your video because I wanted to apply Shiny for my data analysis but when I run the runApp it says that the ui is missing. How did you combine the file (ui and server)? And in 3:39 timeline of the footage - you've used ui.R for shinyServer rather than shinyIU. Please can you explain.
exactly the same issue
Keep both files open in Rstudio
What do you mean by open? I have created 2 fiels separately but how can I make it one?
wtf.. this guy in video switched contents of those 2 files
Thanks Ehsan, good presentation
Great video!!!
Can i ask you how did you open shiny app in browser(firefox) without running R?
Thanks
ERROR: argument "ui" is missing, with no default, not sure what i did wrong
didnt set a path
@@karansawant7986 how do you set a path?
thanx mate for the introduction, also provide the source codes for reference like in github or on a link. Thanks Daniel Noon, please refer to his source code to fix the confusion of the mix ups between server and UI
Hi please explain how you mixed the ui and server?
how can i connect rstudio with php i actually want to display my rstudio graphs and data onto my website,, i am using local server xampp
He din't interchange anything between shinyUI & server files, he just renamed the shinyUI to shinyServer and forgot to explain it or he smartly did it because the code will through the error and he will receive the comments :) , although very good video thanks :)
Is it possible to only draw a histogram or can we make ggplots????
Hey how to do sentiment analysis of any excel file using shiny.please help!
ERROR:object 'size' not found, how to resolve this error?
JVM could not be found - I am getting this error
can i have my own domain for my shiny apps?
Yes. Shiny.rstudio allows you to host a website on their server. Look into it on their site
Hello, thanks for this tutorial it's so helpful, and i want to know if possible how can i create a shiny app if i need to use a function to generate the table where i have all the informations i need to use for my histogram
Cordially
He interchanged the Codes, that is why I have been receiving an error from y side.
can i ask you how to connect php in rstudio?
Elaaf, I have never included Rstudio elements into PHP codes. Have you tried using Rmarkdown? Rmarkdown is used to create HTML pages and transfer that your host.
please how to correct this error (the html page keep closing when i runApp())
Warning: Error in registerShinyDebugHook: attempt to set an attribute on NULL Stack trace (innermost first): 1: runApp Error in registerShinyDebugHook(params) : attempt to set an attribute on NULL
hey.. facing the same issue. did you figure it out?
@@babccn same
Does this skill land jobs?
hi mr Ehsan. I am peyman . Is it possible to send me working directory that you copy and paste? kind regards
I have this ERROR: argument "ui" is missing, with no default :(
dulce bick do you have your codes on a github?
I solved, don´t problem..
No, je is for a company this work, I solved the problem, but I have a doubt, If I have a code finished without shiny, and I would like to have an interface to help to choose the file and put a name to a new file created, how I can do it using shiny? if the read.xlsx and write.csv is into the same code?
I need the solution to this problem! Please!
in specific?
Actually I got error = could not find function "siderbarPanel"
be sure you named it well and saved it after renaming it
Hi Ehsan - Thanks for sharing such a great tutorial on R Programming. I would also like to add this video at tecwallet.com under your name with reference to your youtube channel. Let me know if you are fine with that.
Keep up the good work !!
Hello, Thank you for your comment. Please feel free to post it on Techwallet.com and let me know if you need any information or document.
Thanks Ehsan for allowing us to share your work. Let me know if you want me to use your email id in account creation at Tecwallet. Else will use an internal email for your videos.
Thanks Again !!