Deploying packaged shiny-app on shinyapps.io












0















as described here and here, there are several possibilities to develop a shiny-application as a package and host it online. A common way is to include a ui.R and a server.R file in the inst-Directory in the package, and as part of the package to write a function which calls runApp() using this files.



However, to launch this packaged app online, the file structure on the server must be modified or the function to launch the app must be called by creating another skript. As far as I know, this is not possible on shinyapps.io.



Since I want/must use shinyapps.io, my question is: How can I best deploy a packaged app on shinyapps.io? One possibility would be to upload the package to CRAN, to manually copy the ui.R and server.R files into a new app, include the package (to have access to all the other functions included in the package, beside UI and server-logic), and then deploy this app on shinyapps.io. But: Are there other/better possibilities?










share|improve this question





























    0















    as described here and here, there are several possibilities to develop a shiny-application as a package and host it online. A common way is to include a ui.R and a server.R file in the inst-Directory in the package, and as part of the package to write a function which calls runApp() using this files.



    However, to launch this packaged app online, the file structure on the server must be modified or the function to launch the app must be called by creating another skript. As far as I know, this is not possible on shinyapps.io.



    Since I want/must use shinyapps.io, my question is: How can I best deploy a packaged app on shinyapps.io? One possibility would be to upload the package to CRAN, to manually copy the ui.R and server.R files into a new app, include the package (to have access to all the other functions included in the package, beside UI and server-logic), and then deploy this app on shinyapps.io. But: Are there other/better possibilities?










    share|improve this question



























      0












      0








      0








      as described here and here, there are several possibilities to develop a shiny-application as a package and host it online. A common way is to include a ui.R and a server.R file in the inst-Directory in the package, and as part of the package to write a function which calls runApp() using this files.



      However, to launch this packaged app online, the file structure on the server must be modified or the function to launch the app must be called by creating another skript. As far as I know, this is not possible on shinyapps.io.



      Since I want/must use shinyapps.io, my question is: How can I best deploy a packaged app on shinyapps.io? One possibility would be to upload the package to CRAN, to manually copy the ui.R and server.R files into a new app, include the package (to have access to all the other functions included in the package, beside UI and server-logic), and then deploy this app on shinyapps.io. But: Are there other/better possibilities?










      share|improve this question
















      as described here and here, there are several possibilities to develop a shiny-application as a package and host it online. A common way is to include a ui.R and a server.R file in the inst-Directory in the package, and as part of the package to write a function which calls runApp() using this files.



      However, to launch this packaged app online, the file structure on the server must be modified or the function to launch the app must be called by creating another skript. As far as I know, this is not possible on shinyapps.io.



      Since I want/must use shinyapps.io, my question is: How can I best deploy a packaged app on shinyapps.io? One possibility would be to upload the package to CRAN, to manually copy the ui.R and server.R files into a new app, include the package (to have access to all the other functions included in the package, beside UI and server-logic), and then deploy this app on shinyapps.io. But: Are there other/better possibilities?







      r shiny shinyapps.io






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 21 '18 at 14:40







      Julian

















      asked Nov 21 '18 at 14:03









      JulianJulian

      333315




      333315
























          1 Answer
          1






          active

          oldest

          votes


















          0














          You could try to upload your package on CRAN and call it inside your shinyApp. This would give you all the functionality of your package and everyone else who might be interested in your package aswell. The downside of this is, that you will have to go through a lot of formating, documenting, error checking, rebuilding, etc.. CRAN has quite some strict rules on how the package must "look" like to accept and host it.
          At least you have to have 0 errors and 0 warnings when checking it.





          If you dont want to host it on CRAN you can just include all the functions from the package in a directory and source those files in your Shinyapp. You can do that inside a global.R file or even inside the server.R file, but outside the server function.



          ----- ./App_Directory/

          ---------- global.R

          ---------- server.R

          ---------- ui.R

          ---------- www/

          --------------- function1.R

          --------------- function2.R

          --------------- function_etc.R



          Then you would source them by including those commands in your global.R / server.R file:



          source("www/function1.R")
          source("www/function2.R")
          source("www/function_etc.R")




          You could also just put all the functions directly in your global/server file, but sourcing them is probably more organized and easier to maintain.



          ----- ./App_Directory/

          ---------- global.R

          ---------- server.R

          ---------- ui.R






          share|improve this answer
























          • Thankyou. Possibility one is basically the solution I noted in my question. But is there any possibility to avoid building server.R and ui.R manually for uploading it on shinyapps.io?

            – Julian
            Nov 23 '18 at 8:13













          • Not that I am aware of but I also dont understand too much of what happens behind the curtains at shinyapps.io. But I think it shouldnt be too hard to put all package functions in a script, define a ui.R/server.R, source the script and upload it.

            – SeGa
            Nov 23 '18 at 10:48











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53413813%2fdeploying-packaged-shiny-app-on-shinyapps-io%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          You could try to upload your package on CRAN and call it inside your shinyApp. This would give you all the functionality of your package and everyone else who might be interested in your package aswell. The downside of this is, that you will have to go through a lot of formating, documenting, error checking, rebuilding, etc.. CRAN has quite some strict rules on how the package must "look" like to accept and host it.
          At least you have to have 0 errors and 0 warnings when checking it.





          If you dont want to host it on CRAN you can just include all the functions from the package in a directory and source those files in your Shinyapp. You can do that inside a global.R file or even inside the server.R file, but outside the server function.



          ----- ./App_Directory/

          ---------- global.R

          ---------- server.R

          ---------- ui.R

          ---------- www/

          --------------- function1.R

          --------------- function2.R

          --------------- function_etc.R



          Then you would source them by including those commands in your global.R / server.R file:



          source("www/function1.R")
          source("www/function2.R")
          source("www/function_etc.R")




          You could also just put all the functions directly in your global/server file, but sourcing them is probably more organized and easier to maintain.



          ----- ./App_Directory/

          ---------- global.R

          ---------- server.R

          ---------- ui.R






          share|improve this answer
























          • Thankyou. Possibility one is basically the solution I noted in my question. But is there any possibility to avoid building server.R and ui.R manually for uploading it on shinyapps.io?

            – Julian
            Nov 23 '18 at 8:13













          • Not that I am aware of but I also dont understand too much of what happens behind the curtains at shinyapps.io. But I think it shouldnt be too hard to put all package functions in a script, define a ui.R/server.R, source the script and upload it.

            – SeGa
            Nov 23 '18 at 10:48
















          0














          You could try to upload your package on CRAN and call it inside your shinyApp. This would give you all the functionality of your package and everyone else who might be interested in your package aswell. The downside of this is, that you will have to go through a lot of formating, documenting, error checking, rebuilding, etc.. CRAN has quite some strict rules on how the package must "look" like to accept and host it.
          At least you have to have 0 errors and 0 warnings when checking it.





          If you dont want to host it on CRAN you can just include all the functions from the package in a directory and source those files in your Shinyapp. You can do that inside a global.R file or even inside the server.R file, but outside the server function.



          ----- ./App_Directory/

          ---------- global.R

          ---------- server.R

          ---------- ui.R

          ---------- www/

          --------------- function1.R

          --------------- function2.R

          --------------- function_etc.R



          Then you would source them by including those commands in your global.R / server.R file:



          source("www/function1.R")
          source("www/function2.R")
          source("www/function_etc.R")




          You could also just put all the functions directly in your global/server file, but sourcing them is probably more organized and easier to maintain.



          ----- ./App_Directory/

          ---------- global.R

          ---------- server.R

          ---------- ui.R






          share|improve this answer
























          • Thankyou. Possibility one is basically the solution I noted in my question. But is there any possibility to avoid building server.R and ui.R manually for uploading it on shinyapps.io?

            – Julian
            Nov 23 '18 at 8:13













          • Not that I am aware of but I also dont understand too much of what happens behind the curtains at shinyapps.io. But I think it shouldnt be too hard to put all package functions in a script, define a ui.R/server.R, source the script and upload it.

            – SeGa
            Nov 23 '18 at 10:48














          0












          0








          0







          You could try to upload your package on CRAN and call it inside your shinyApp. This would give you all the functionality of your package and everyone else who might be interested in your package aswell. The downside of this is, that you will have to go through a lot of formating, documenting, error checking, rebuilding, etc.. CRAN has quite some strict rules on how the package must "look" like to accept and host it.
          At least you have to have 0 errors and 0 warnings when checking it.





          If you dont want to host it on CRAN you can just include all the functions from the package in a directory and source those files in your Shinyapp. You can do that inside a global.R file or even inside the server.R file, but outside the server function.



          ----- ./App_Directory/

          ---------- global.R

          ---------- server.R

          ---------- ui.R

          ---------- www/

          --------------- function1.R

          --------------- function2.R

          --------------- function_etc.R



          Then you would source them by including those commands in your global.R / server.R file:



          source("www/function1.R")
          source("www/function2.R")
          source("www/function_etc.R")




          You could also just put all the functions directly in your global/server file, but sourcing them is probably more organized and easier to maintain.



          ----- ./App_Directory/

          ---------- global.R

          ---------- server.R

          ---------- ui.R






          share|improve this answer













          You could try to upload your package on CRAN and call it inside your shinyApp. This would give you all the functionality of your package and everyone else who might be interested in your package aswell. The downside of this is, that you will have to go through a lot of formating, documenting, error checking, rebuilding, etc.. CRAN has quite some strict rules on how the package must "look" like to accept and host it.
          At least you have to have 0 errors and 0 warnings when checking it.





          If you dont want to host it on CRAN you can just include all the functions from the package in a directory and source those files in your Shinyapp. You can do that inside a global.R file or even inside the server.R file, but outside the server function.



          ----- ./App_Directory/

          ---------- global.R

          ---------- server.R

          ---------- ui.R

          ---------- www/

          --------------- function1.R

          --------------- function2.R

          --------------- function_etc.R



          Then you would source them by including those commands in your global.R / server.R file:



          source("www/function1.R")
          source("www/function2.R")
          source("www/function_etc.R")




          You could also just put all the functions directly in your global/server file, but sourcing them is probably more organized and easier to maintain.



          ----- ./App_Directory/

          ---------- global.R

          ---------- server.R

          ---------- ui.R







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 21 '18 at 19:11









          SeGaSeGa

          4,71131136




          4,71131136













          • Thankyou. Possibility one is basically the solution I noted in my question. But is there any possibility to avoid building server.R and ui.R manually for uploading it on shinyapps.io?

            – Julian
            Nov 23 '18 at 8:13













          • Not that I am aware of but I also dont understand too much of what happens behind the curtains at shinyapps.io. But I think it shouldnt be too hard to put all package functions in a script, define a ui.R/server.R, source the script and upload it.

            – SeGa
            Nov 23 '18 at 10:48



















          • Thankyou. Possibility one is basically the solution I noted in my question. But is there any possibility to avoid building server.R and ui.R manually for uploading it on shinyapps.io?

            – Julian
            Nov 23 '18 at 8:13













          • Not that I am aware of but I also dont understand too much of what happens behind the curtains at shinyapps.io. But I think it shouldnt be too hard to put all package functions in a script, define a ui.R/server.R, source the script and upload it.

            – SeGa
            Nov 23 '18 at 10:48

















          Thankyou. Possibility one is basically the solution I noted in my question. But is there any possibility to avoid building server.R and ui.R manually for uploading it on shinyapps.io?

          – Julian
          Nov 23 '18 at 8:13







          Thankyou. Possibility one is basically the solution I noted in my question. But is there any possibility to avoid building server.R and ui.R manually for uploading it on shinyapps.io?

          – Julian
          Nov 23 '18 at 8:13















          Not that I am aware of but I also dont understand too much of what happens behind the curtains at shinyapps.io. But I think it shouldnt be too hard to put all package functions in a script, define a ui.R/server.R, source the script and upload it.

          – SeGa
          Nov 23 '18 at 10:48





          Not that I am aware of but I also dont understand too much of what happens behind the curtains at shinyapps.io. But I think it shouldnt be too hard to put all package functions in a script, define a ui.R/server.R, source the script and upload it.

          – SeGa
          Nov 23 '18 at 10:48




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53413813%2fdeploying-packaged-shiny-app-on-shinyapps-io%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          鏡平學校

          ꓛꓣだゔៀៅຸ໢ທຮ໕໒ ,ໂ'໥໓າ໼ឨឲ៵៭ៈゎゔit''䖳𥁄卿' ☨₤₨こゎもょの;ꜹꟚꞖꞵꟅꞛေၦေɯ,ɨɡ𛃵𛁹ޝ޳ޠ޾,ޤޒޯ޾𫝒𫠁သ𛅤チョ'サノބޘދ𛁐ᶿᶇᶀᶋᶠ㨑㽹⻮ꧬ꧹؍۩وَؠ㇕㇃㇪ ㇦㇋㇋ṜẰᵡᴠ 軌ᵕ搜۳ٰޗޮ޷ސޯ𫖾𫅀ल, ꙭ꙰ꚅꙁꚊꞻꝔ꟠Ꝭㄤﺟޱސꧨꧼ꧴ꧯꧽ꧲ꧯ'⽹⽭⾁⿞⼳⽋២៩ញណើꩯꩤ꩸ꩮᶻᶺᶧᶂ𫳲𫪭𬸄𫵰𬖩𬫣𬊉ၲ𛅬㕦䬺𫝌𫝼,,𫟖𫞽ហៅ஫㆔ాఆఅꙒꚞꙍ,Ꙟ꙱エ ,ポテ,フࢰࢯ𫟠𫞶 𫝤𫟠ﺕﹱﻜﻣ𪵕𪭸𪻆𪾩𫔷ġ,ŧآꞪ꟥,ꞔꝻ♚☹⛵𛀌ꬷꭞȄƁƪƬșƦǙǗdžƝǯǧⱦⱰꓕꓢႋ神 ဴ၀க௭எ௫ឫោ ' េㇷㇴㇼ神ㇸㇲㇽㇴㇼㇻㇸ'ㇸㇿㇸㇹㇰㆣꓚꓤ₡₧ ㄨㄟ㄂ㄖㄎ໗ツڒذ₶।ऩछएोञयूटक़कयँृी,冬'𛅢𛅥ㇱㇵㇶ𥄥𦒽𠣧𠊓𧢖𥞘𩔋цѰㄠſtʯʭɿʆʗʍʩɷɛ,əʏダヵㄐㄘR{gỚṖḺờṠṫảḙḭᴮᵏᴘᵀᵷᵕᴜᴏᵾq﮲ﲿﴽﭙ軌ﰬﶚﶧ﫲Ҝжюїкӈㇴffצּ﬘﭅﬈軌'ffistfflſtffतभफɳɰʊɲʎ𛁱𛁖𛁮𛀉 𛂯𛀞నఋŀŲ 𫟲𫠖𫞺ຆຆ ໹້໕໗ๆทԊꧢꧠ꧰ꓱ⿝⼑ŎḬẃẖỐẅ ,ờỰỈỗﮊDžȩꭏꭎꬻ꭮ꬿꭖꭥꭅ㇭神 ⾈ꓵꓑ⺄㄄ㄪㄙㄅㄇstA۵䞽ॶ𫞑𫝄㇉㇇゜軌𩜛𩳠Jﻺ‚Üမ႕ႌႊၐၸဓၞၞၡ៸wyvtᶎᶪᶹစဎ꣡꣰꣢꣤ٗ؋لㇳㇾㇻㇱ㆐㆔,,㆟Ⱶヤマފ޼ޝަݿݞݠݷݐ',ݘ,ݪݙݵ𬝉𬜁𫝨𫞘くせぉて¼óû×ó£…𛅑הㄙくԗԀ5606神45,神796'𪤻𫞧ꓐ㄁ㄘɥɺꓵꓲ3''7034׉ⱦⱠˆ“𫝋ȍ,ꩲ軌꩷ꩶꩧꩫఞ۔فڱێظペサ神ナᴦᵑ47 9238їﻂ䐊䔉㠸﬎ffiﬣ,לּᴷᴦᵛᵽ,ᴨᵤ ᵸᵥᴗᵈꚏꚉꚟ⻆rtǟƴ𬎎

          Why https connections are so slow when debugging (stepping over) in Java?