none
Unable to Install Rqbase-master package on SQL Server 2016 R (In-Database Feature) RRS feed

  • Question

  • I am trying to install Rqbase-master package on one of my box but unable to install.

    When I tried to install using RGUI with command install.packages("Rqbase-master") or install.packages("Rqbase") I got error: Warning message:
    package ‘Rqbase-master’ is not available (for R version 3.4.3) 

    So I downloaded this Package zip file on my local and tried to install using RGUI command install.packages("R:\\Rqbase-master.zip", repos=NULL) but this time it returned nothing in result - No Success Message and No Error. However, I can see folder exists inside Library folder.

    I checked all installed packages using below TSQL:

    EXECUTE sp_execute_external_script
      @language=N'R',
      @script = N'str(OutputDataSet);
      packagematrix <- installed.packages();
      Name <- packagematrix[,1];
      Version <- packagematrix[,3];
      OutputDataSet <- data.frame(Name, Version);',
      @input_data_1 = N''
    WITH RESULT SETS ((PackageName nvarchar(250), PackageVersion nvarchar(max) ))

    In result set we don't have any package name as Rqbase or Rqbase-master.

    Any idea, how can we installed and registered this package to use on SQL Server 2016 R (in Database) feature?

    Source of this Rqbase Package is https://github.com/mre011/Rqbase

    Thank you!
    Tuesday, January 29, 2019 8:10 PM

Answers

  • Finally, I am able to install Rqbase correctly. So I just want to share:

    1. Download Rqbase-master zip folder from https://github.com/mre011/Rqbase
    2. Unzipp that folder on repository.
    3. Open 
    Rqbase-master unzip folder and open Rqbase using RStudio tool.
    4. Download and Install latest Rtools exe from https://cran.rstudio.com/bin/windows/Rtools/
    5. Inside RStudio Go To -> Build Tab -> Click on Install and Restart.

    This way Rqbase will be installed on the machine and I am able to see the same Rqbase registered inside SQL Server using below TSQL:

    EXECUTE sp_execute_external_script
      @language=N'R',
      @script = N'str(OutputDataSet);
      packagematrix <- installed.packages();
      Name <- packagematrix[,1];
      Version <- packagematrix[,3];
      OutputDataSet <- data.frame(Name, Version);',
      @input_data_1 = N''
    WITH RESULT SETS ((PackageName nvarchar(250), PackageVersion nvarchar(max) ))

    Thank you!
     
    • Marked as answer by Prince Rastogi Wednesday, January 30, 2019 8:23 PM
    Wednesday, January 30, 2019 8:23 PM

All replies

  • Hello,

    just running install.packages("rqbase") assumes that the package is actually available for the specific version of R that we ship with the SQL Server 2016 in-database feature, which it is not. Not sure what package ZIP file you tried to download, but please look at https://docs.microsoft.com/en-us/sql/advanced-analytics/r/install-additional-r-packages-on-sql-server?view=sql-server-2016 to find instructions on how to install packages. One of the reasons the install is failing might be because the prerequisites are not installed either.

    Wednesday, January 30, 2019 12:13 AM
    Owner
  • Hi,

    I have already upgraded version of R to the latest one.

    Rqbase-master zip file that I have downloaded is from https://github.com/mre011/Rqbase.

    I already followed instruction specified on 
    https://docs.microsoft.com/en-us/sql/advanced-analytics/r/install-additional-r-packages-on-sql-server?view=sql-server-2016.

    Prerequisite for this package was R version >= 3.2.3 which I have already upgraded.
     

    Wednesday, January 30, 2019 2:13 AM
  • what if you include 'type="source"' to your install.packages command? see: https://stackoverflow.com/questions/1474081/how-do-i-install-an-r-package-from-source
    Wednesday, January 30, 2019 4:50 PM
    Owner
  • No luck with 'type="source"' as well
    Wednesday, January 30, 2019 7:26 PM
  • Finally, I am able to install Rqbase correctly. So I just want to share:

    1. Download Rqbase-master zip folder from https://github.com/mre011/Rqbase
    2. Unzipp that folder on repository.
    3. Open 
    Rqbase-master unzip folder and open Rqbase using RStudio tool.
    4. Download and Install latest Rtools exe from https://cran.rstudio.com/bin/windows/Rtools/
    5. Inside RStudio Go To -> Build Tab -> Click on Install and Restart.

    This way Rqbase will be installed on the machine and I am able to see the same Rqbase registered inside SQL Server using below TSQL:

    EXECUTE sp_execute_external_script
      @language=N'R',
      @script = N'str(OutputDataSet);
      packagematrix <- installed.packages();
      Name <- packagematrix[,1];
      Version <- packagematrix[,3];
      OutputDataSet <- data.frame(Name, Version);',
      @input_data_1 = N''
    WITH RESULT SETS ((PackageName nvarchar(250), PackageVersion nvarchar(max) ))

    Thank you!
     
    • Marked as answer by Prince Rastogi Wednesday, January 30, 2019 8:23 PM
    Wednesday, January 30, 2019 8:23 PM
  • Glad to see you got it resolved. Thanks for reporting back!
    Thursday, January 31, 2019 12:39 AM
    Owner