![]() The data we will use is supplemental table 6 from the paper “Comprehensive genomic analysis reveals FLT3 activation and a therapeutic strategy for a patient with relapsed adult B-lymphoblastic leukemia.”. Now that we’ve got a basic frame work up let’s go ahead and load some data and answer a few questions. Loading data into the shiny back end (server) So far, all you should see is an empty page. Alternatively you can view your app in a web browser at. If successful, Rstudio will display a new window with your application running. Getwd () setwd ( "/Users/mgriffit/Desktop/testApp" ) getwd () runApp ( port = 7777 ) This is the bare minimum for a shiny app and will generate an empty web application. Next create the following two scripts there: ui.R and server.R. Go ahead and make a folder for our shiny app called “testApp”. Both of these files should be in the same directory for the app to work properly. The user interface script is the front end and is essentially what a user views and interacts with. The server script is the back end of our shiny web app and contains the instructions to build the app. The basic code to run any shiny app is split into two parts: the server (e.g., server.R) and user interface (e.g., ui.R). ![]() Īfter checking it out, use the escape key to stop the shiny app. If you are in Rstudio your web application should have been opened automatically, however you can also view these with any modern web browser by going to the web address listed after calling runExample(). In simplified terms these html pages are simply being hosted by your own computer. What shiny is actually doing here is converting the R code to html pages and serving those on a random port using the ip address 127.0.0.1 which is localhost on most computers. ![]() # install and load shiny install.packages ( "shiny" ) library ( shiny ) # list the built in shiny app examples runExample () # run one of these examples in Rstudio runExample ( "06_tabsets" )
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |