Creating, optimizing and synching R shiny apps using brightRserver

[This article was first published on R – YakData brightRserver, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Building, maintaining, and improving interactive R shiny apps has never been easier. YakData’s brightRserver seamlessly combines the best-in-class R editor and R web app server with Secure FTP publishing and synchronization.

Watch this article

Leverage the most popular IDE for R

YakData brightRserver Editor

Ready to create a new R shiny app? The brightRserver Editor is a secured version of the most popular open-source IDE for R, so you’re probably familiar with how it works. There also are many online resources for learning the details. If you have an existing app that you’d like to edit, you can do that here too.

To set you up for success, more than 2000 R packages are pre-installed for the brightRserver R environment. In the screenshot above, a search for “shiny” results in a list of the most popular R web app packages, all of which are compatible with brightRserver.

The ubiquitous app.R file

Open a brightR app in YakData brightRserver

For simplicity, let’s focus on opening and reviewing an R shiny app that’s already published to brightRserver. The R file for this app is located in the YakData Launch Demo file, titled “app.R”.

The path to this file shows that this R shiny app is published to a public folder. Public folders on brightRserver allow access to anyone with a web link, whether or not they have an account.

Code behind the scenes

An R web app based on the shiny package from CRAN

Opening the app.R file lets you see how this R shiny app is built. In this example, the R code window displays important comments at the top followed by many R library statements. As you scroll down, you’ll see hundreds of lines of R code which powers the app.

The brightRserver Editor includes numerous features to maximize your productivity. A few highlights: code completion, syntax highlighting, executing R code interactively, inspecting functions, interactive web app execution and interactive package help.

Inspect and improve the data and app

brightRserver mobile-friendly forecaster app

Running your R shiny app allows you to verify that the analysis and display are appropriate for the dataset. You can also ensure that the app functions as expected for the best user experience. Since you are interactively running the app in the same environment as the web app server, you can be confident that your users will see what you see.

The screenshot shows how clean and simple the final R shiny app can appear. Even users who are not technically skilled can easily sort and filter the data and page through the various tabs at the bottom of the screen.  View and interact with the YakData brightRserver mobile-friendly forecaster app live in the gallery.

Synch data and R shiny apps via SFTP

Use Secure FTP to publish data, brightR apps and supporting files to brightRserver

Using shell scripts or your choice of preferred Secure File Transfer Protocol (SFTP) program, you can synch content from your computer to your brightRserver and vice-versa. Here, Filezilla is used to upload data for the YakData Launch Demo from the desktop to the brightRserver.

brightRserver hosted R shiny apps achieve high performance for several reasons including the fact that file-based data sources are located on the same server as the apps. Of course, you can also utilize numerous remote data sources such as Amazon S3, MySQL, PostgreSQL and Google Analytics.

Interested in all the user roles involved in creating, sharing and utilizing brightRserver web apps? Check out the next post.

About YakData brightRserver
Develop R applications with a powerful IDE and share secure R web applications on a dedicated server in one of 14 locations worldwide with YakData brightRserver.​ Explore the brightRserver App Gallery, Blog or Buy page​ to learn more and get started today.​

To leave a comment for the author, please follow the link and comment on their blog: R – YakData brightRserver.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)