We need some additional packages to enable R to process our scripts and accept requests from Qlik Sense; let's install these packages now.
First of all, we need to install Rserve, the package that enables a TCP/IP server, which provides connections, making it possible to integrate R as a server. R is interactive; we type commands at the prompt and see the results. We need to transform R into a server so that it can act as a backend for Qlik Sense. To install Rserve, please access your console and type the following:
install.packages("Rserve", lib = "C:\R\R-3.5.2\library")
Please adjust this path to where we have installed R from our Installing R section (probably C:\R\R-3.5.2\library) and hit Enter. A screen will be displayed so that you can see the CRAN mirror (the server where the software can be downloaded). The default should be enough for our needs:
You should then see a screen like the following. Please search for the 'Rserve' successfully unpacked message, as follows:
Let's test to see if everything is okay here, as follows:
> library(Rserve)
> Rserve()
You should see a message like the following, attesting that everything is okay and that Rserve is running:
Starting Rserve...
"C:RR-35~1.2libraryRservelibsx64Rserve.exe"
> Rserve: Ok, ready to answer queries.