-
Notifications
You must be signed in to change notification settings - Fork 10
/
04-wider-ecosystem.Rmd
36 lines (18 loc) · 5.58 KB
/
04-wider-ecosystem.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# The Wider Ecosystem & Tools
## Integrated Development Environments, or IDEs
As a scripting language, it’s possible to write R code in any text editor. However, as your codebase becomes larger, it becomes increasingly helpful to use a proper Integrated Development Environment (IDE). An IDE may offer syntax highlighting, making the code quicker and more straightforward to read; code completion, where the IDE suggests functions and so on as you begin to type their names; integration with a version control system; an integrated debugger; and a host of other features besides.
Many advanced text editors and IDEs support R, including Atom, VSCode, Sublime Text, Eclipse (via the [StatET](http://www.walware.de/goto/statet) plugin), Vim and Emacs (via the [ESS extension](https://ess.r-project.org/)). Some people are happy using these tools, though the vast majority prefer a more fully fledged IDE, and there are currently three main options in this space:
### RStudio
The [RStudio IDE](https://www.rstudio.com/products/rstudio/), from the company also called RStudio, is almost the de-facto standard IDE within the community. It was written from the ground-up with R users in mind and has an extensive feature set. The fact that RStudio develop both the IDE and many of the community’s most used packages has meant that the development team have been able to surface additional functionality within the IDE itself. For example, the IDE has a graphical connection interface that directly interfaces with the [sparklyr](https://spark.rstudio.com) package for working with Spark clusters. RStudio also has a server based version of the IDE that can be accessed and used via a web browser, so nothing needs to be installed on the client device.
The IDE is available in both open-source and commercial versions and works on Mac, Windows, and Linux.
### Visual Studio (Using “R Tools for Visual Studio”)
[Visual Studio](https://visualstudio.com) is a powerful IDE with a long history and has recently had the R treatment too. There is an option in later versions to install “R Tools for Visual Studio”, which installs all the features you’d expect for working with R. In addition, it also has the ability to connect directly to a remotely running R session on a SQL Server 2017 or above, which means it can be used to drive sessions on much more powerful hardware than is usual for an end user computing device.
Visual Studio is available for Windows and MacOS, and is available in community and commercial versions. For licensing information please check the website for more details.
### Jupyter
[Jupyter](http://jupyter.org/) is a little different from the other IDEs listed here, in that it only supports the “notebook” format of development. In the notebook format, code is executed in chunks and the results of the execution of that code is displayed immediately underneath. Jupyter has its roots in the Python community and is very popular there. It has since broadened out to support other languages -- including R -- though R use is not yet as polished as Python.
## Web Apps in R with Shiny
Many people encountering R for the first time will be introduced to it through a Shiny application. [Shiny](https://shiny.rstudio.com/) is a framework for developing interactive web applications in R and can harness the powerful statistical and graphical capabilities of the language. Using Shiny, an R user with no real knowledge of web development can develop powerful interactive web applications -- referred to as Shiny apps -- with relative ease and no knowledge of HTML, CSS or JavaScript.
Since Shiny apps require R to run, in order to publish them, they need their own server software. As Shiny is another RStudio project, they also have the server side software required to publish these Shiny apps to end users. There are a couple of options for this, namely Shiny Server and RStudio Connect.
[Shiny Server](https://www.rstudio.com/products/shiny/shiny-server/) is open-source server software built for running Shiny apps. It does not have a great deal in the way of features, but what it does, it does very well. It allows a user to publish the Shiny apps that they've written to an always-on server system. Those apps can the be accessed by their end user community. For example, a shiny app could be written that provided a sales forecast, which could be published using Shiny Server and accessed by the management team at any time of the day or night and all without them having to know anything about R at all. If you would rather not stand up your own shiny server, you can check out [shinyapps.io](https://shinyapps.io/) which provides both free and paid plans for hosting shiny applications.
If you are a professional organization which requires features like controlling access to individual apps with passwords, the ability to scale to handle larger audiences, or the ability to control resource consumption you can checkout the commercial version, Shiny Server Pro, or the more recent addition [RStudio Connect](https://www.rstudio.com/products/connect/).
RStudio Connect is the next step in the evolution of the Shiny Server Pro product, aimed at greatly enhancing performance as well as easing administration. In addition to serving Shiny apps, Connect can be used to publish reports written with [RMarkdown](http://rmarkdown.rstudio.com/), is capable of hosting APIs written in R with the plumber package, and has other features such as the ability to generate reports on a schedule and email them to a group of end users. Connect also uses a lightweight process isolation technique to prevent individual applications from interfering with each other.