Connecting: Oracle Autonomous DB and R - ROracle package issue - r

I'm trying to connect RStudio on a compute instance to the Oracle autonomous warehouse.
I've covered the following steps:
Provisioned Autonomous Data Warehouse
(https://docs.oracle.com/en/cloud/paas/autonomous-data-warehouse-cloud/tutorial-provision-adw/)
Stored the DB connection Wallet;
Installed Oracle Instant client basic package: https://www.oracle.com/technetwork/topics/winx64soft-089540.html
Downloaded and placed in the same directory as the instant client: SDK package & ODBC package
included Instant package path in environment veriable PATH ("C:/oracle_client/instantclient_18_5") and create OCI_LIB64 system variable with the same path
installed GTools checking the PATH options
Extracted the wallet to: C:\oracle_client\instantclient_18_5\network\admin
Now I'm experience an inssue installing the ROracle package within RStudio.
I'm using the following script:
Sys.setenv(OCI_LIB64="C:/oracle_client/instantclient_18_5")
install.packages("ROracle")
The error I got is the include headers have not been found:
Warning in strptime(xx, f, tz = tz) :
unable to identify current timezone 'C':
please set environment variable 'TZ'
* installing *source* package 'ROracle' ...
** package 'ROracle' successfully unpacked and MD5 sums checked
** using staged installation
Oracle Client Shared Library 64-bit - 18.5.0.0.0 Operating in Instant Client mode.
found Instant Client C:/oracle_client/instantclient_18_5
found Instant Client SDK C:/oracle_client/instantclient_18_5/sdk/include
ERROR: cannot find Oracle Client include headers in C:/oracle_client/instantclient_18_5/sdk/include.
Please set OCI_INC to correct location.
ERROR: configuration failed for package 'ROracle'
* removing 'C:/Users/opc/Documents/R/win-library/3.6/ROracle'
Warning in install.packages :
installation of package ‘ROracle’ had non-zero exit status
Everybody is saying to also set OCI_INC like this (but I do not have a directory in the manner "...client_1/oci/include/:
Sys.setenv(OCI_INC="C:/Oracle/product/11.2.0/client_1/oci/include")
Any idea what am I missing for the ROracle or in general?
R version: 3.6
Operating system: Windows Server on a compute instance

According to the documentation (https://docs.oracle.com/en/database/oracle/r-enterprise/1.5.1/oread/installing-oracle-database-instant-client.html#GUID-8C502BDD-C1A1-4EA0-9E88-D2F8452D4AC2) you need to download "Instant Client Package - SDK". When I checked the webpage for instant client the links for the SDK version were absent.
However,if you go here: https://www.oracle.com/database/technologies/instant-client/downloads.html and select you O/S on the following page there should be a link for the SDK version. For example, I use a Mac and the correct download is here:https://download.oracle.com/otn_software/mac/instantclient/193000/instantclient-sdk-macos.x64-19.3.0.0.0dbru.zip
Once I unzipped that file, the directory structure had an .../include folder with .h files that I think the installer needs to complete. Therefore, the correct settings on my Mac would be:
OCI_LIB64 set to /Users/keithlaker/Downloads/instantclient_19_3
OCI_INC set to /Users/keithlaker/Downloads/instantclient_19_3/sdk/include
One thing to note...I am not familiar with R but in broad general terms Oracle's in-database implementation of R (in-database R script repository and R object Datastore) that is part of the now free EE "Advanced Analytics" option is not part of Autonomous Database.
Therefore, your R project should be able to connect but you will not be able to use any of the usual in-database R packages because they don't exist.
Hope this helps.
Just found a thread on our internal forum which is worth sharing. The above might allow you to install the R client but ADB (ADW/ATP) does not support the use of ore.connect() and ore.disconnect(). Support for R is on our product map, see this presentation from OpenWorld 2019 - https://static.rainfocus.com/oracle/oow19/sess/1553766982670001yXnT/PF/CON4719%20OOW%20SF%202019%20-%20Hornick%20-%20OML%20Overview%20and%20Roadmap%20v1.4_1568740954169001k3Df.pdf

Related

deployment on shinyapps.io failing

Hi I'm trying to deploy an app on the server, however, I get the following errors
* May be unable to deploy package dependency "rClr" could not
determine a repository URL for the source CRAN.
* May be unable to deploy package dependency "tlf" could not determine
a repository URL for the source CRAN.
Unable to determine the source location for some packages. Packages
should be installed from a package repository like CRAN or a version
control system. Check that options(repos) refers to a package
repository containing the needed package versions.
The backbone packages can not be installed from Cran and have to be done manually, hence the errors. How can this be fixed in order to deploy the app on the server?
Thanks for all help

DSVM - Visual Studio - R - cannot use an installed package

I am running an R script on Visual Studio in a DSVM. I ran into a problem installing a package (RODBC) that was already installed. I get this message:
package 'RODBC' successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package 'RODBC'
And if I try to load the library I get the message that it doesn’t exist.
Error in base::library(...): there is no package called 'RODBC'
In package manager it’s available but not installed.
But in the library path, in file explorer, the package is there and I cannot delete it – always get the message that the folder is in use even if VS is closed. I tried changing the permissions to full control and still no luck.
Please let me know if you have any suggestion on how to fix this problem.
Many thanks.
Please check the R tools for Visual Studio (RTVS) options and see if the R Engine (64 bit) setting is empty. If it is empty, you need to set it to the directory where the Microsoft R (or ML Server on latest Windows 2016 edition of DSVM ) is installed.

problems with installing r packages on windows 10

I'm having problems installing r packages using R3.4.1 on windows 10.
E.g. I get the following message when trying to install a package:
package ‘ctv’ successfully unpacked and MD5 sums checked
Warning in install.packages :
unable to move temporary installation ‘C:\Program Files\R\R-3.4.1\library\file34470c9f23\ctv’ to ‘C:\Program Files\R\R-3.4.1\library\ctv’
I would really appreciate any assistance to resolve this issue.
Normally one puts the library in C:\user\yourname\Documents\R\win-library. Each version of R will have its library in a separate folder within that folder. In that case you won't get this error. If you reinstall R and accept the default for the library location then it will put the library there and you won't get this error.
If you prefer the configuration you have now because, for example, there are multiple users on your PC that need to share the library, then you will need to be Administrator each time you install a package; however, note that your current configuration is less secure than the default.

How do you import an R module to a computer with no internet?

I'm working on a mac computer that has restricted-use data and cannot be connected to the internet. I need an R-module on the computer called rgexf. When I try to install it on R following the instructions here:
> install.packages('[where the zip file is]/rgexf_0.12.03.tar.gz', repos = NULL)
I get this error:
Installing package(s) into '/Users/samfinegold/Library/R/2.15/library' (as 'lib' is unspecified)
Warning: unable to access index for repository NULL/bin/macosx/leopard/contrib/2.15
Warning message: package '/Users/samfinegold/Desktop/rgexf_0.13.01.tar.gz' is not available (for R version 2.15.3)
I don't understand why the package wouldn't be available for the most recent version of R though.
You have specified a source package (identified by the "tar.gz" extension) but not told install.packages to use type ="source". You are also asking for the most recent version of the file which might be mated to version 3.0.0 for R.Its DESCRIPTION file says it does require compilation so you either need properly set-up tools for building source packages (if you want to install from source), or you need an appropriate binary version of the package. Whether there is an earlier version that can be mated to R 2.15.3 is an open question.
If you want to compile packages from source, you must have the correct XCode for the version of OSX that is on your machine. And you may need to get additional development tools from the ATT.research website. And if you have a more recent version of Xcode (higher than 3.x I think), don't forget to install the Command Line Tools package either from the Apple Developer Store or using the drop-down menu in a running installation of Xcode.
There is a MacOS binary at CRAN. Given your difficulties with source installation I would try to get a copy of that on a USB stick and retry with a binary distribution. (You do not need to use type="mac.binary" since that is the default for that parameter to install.packages.
Have you checked the permissions on the computer? The first warning message looks like it could be a root/admin vs. user issue for accessing the file. The other possibility since you have a NULL in the warning message is that you've entered the directory wrong (try without the '/' to lead perhaps).

Unable to install and run a package in R (windows)

I am working on a 64 bit windows system. And I have a 64 bit, 2.15.1 version of R installed in it. I am trying to install a package called "MethLAB" from the package menu, by selecting its local zip file from the "Packages" menu. However I am running into an error show below.
> utils: : :menuInstallLocal ()
package 'MethLAB' successfully unpacked and MDS sums checked
> library(MethLAB)
> MethLAB()
Warning message:
In file (filename, "r", encoding =encoding) :
unable to resolve 'bioconductor.org'
So the above is what i get when i try to run it. Can anyone help me with its proper installation and running ?
I suspect it is because you are not connected to the internet. Is that so? If it is then you should contact the people that wrote the package; it seems the software is trying to contact BioConductor for some reason, perhaps to download additional packages/functionality etc. To that end, make sure you have installed all the pre-requisite packages needed to run `MethLAB.
Do note that this is a warning only, not an error. Whether this stops the package from working or not is a different matter. Again you should take this up with the developers if you have followed all the instructions on how to install and use the package.

Resources