Shiny app package


#1

Hello,
I know hoe to create a RStudio package. Now, I am working on a shiny app and I think I have to create a shiny app package. My GUI will have to interact with already created R programs. It will take input from the user such as “Please enter path and name of file to upload to the shiny server” and it will run the R programs. If I create a Shiny app package, will I have to create a RStudio package as well, or will the R programs be included in the shiny app?

Thanks,

Giuseppa


#2

I am assuming by “RStudio package”, you just mean a normal R package. What you are trying to accomplish is not totally clear to me, do you want to make a package for your shiny app because you want to be able to duplicate certain functions in several apps or are you just trying to deploy it to a shiny server?

If it is the former, then an r package would be the way to go. Maybe the easiest way to write a shiny package would be to write modules that perform certain tasks. Since modules are just functions, the package development would work the same way that normal package development does. You can read more about modules here

However, if it is the later, then you do not “have to” create a package to do this. You would just need to put the shiny app onto a server with shiny server on it.

As far as allowing users to upload files and have pre defined processes done to the data, this is all possible without having to create a package. You can use fileInput() for this.

So in conclusion, I would say that if you want to duplicate the same thing across multiple apps then writing a package may be worth it and could save you time in the long run. However, if this is for a single app, it may require more effort than is necessary.


#3

Thank you. I ma trying to create a shiny app that interacts with or runs a pipeline written in R to afterwards deploy it to a shiny server. Therefore, I do not have to create a package.


#4

I have installed OpenMS in /home/usernamename/Development and I have created a folder inside Development called appilcationNameApp. So the absolute path is /home/username/Development/applicationNameApp/app.R. OpenMS is going to be called by the R program that interacts with app.R. Should I make /home/username/Development/applicationNameApp my R working directory?