It was PAINFUL, but I was able to install ROracle, building from source, in RStudio R4.2 with Windows 11.
Here are my notes:
###*** PROCEDURE TO INSTALL ROracle ***###
Notes from https://community.oracle.com/tech/developers/discussion/4493466/roracle-for-r-4-0-0-or-newer
Get and install the new version of R.
Install the new version of Rtools. In my case it was the version 4.2 like stated in post at notes page above: https://cran.r-project.org/bin/windows/Rtools/rtools42/rtools.html.
Click Rtools42_installer. Accept defaults.
Get new version of Oracle Instant Client and extract it into folder C:\oracle, creating C:\oracle\instantclient_21_6 https://www.oracle.com/database/technologies/instant-client/downloads.html
Get new version from sdk package for the Instant client https://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.html
Make sure to extract sdk package into instant client folder at: C:\oracle\instantclient_21_6. So in my case resulting in: C:\oracle\instantclient_21_6\sdk.
Open your "Environment Variables" and add variable "OCI_LIB64" with same value where your Instant client is located (in my case C:\oracle\instantclient_21_6)
In "Environment Variables" also add variable "PATH" with same value C:\oracle\instantclient_21_6 (There was already a "Path" variable. Add "PATH" as new. I got LoadLibrary errors until doing this.
Download new version of ROracle (ROracle_1.3-2.tar.gz) https://www.oracle.com/database/technologies/roracle-downloads.html and store it into document folder.
At least in my case remotes::install_local function called the package from that location.
When you try to run the install command in R the remotes::install_local will give you warning where it is trying to find ROracle if it cannot find it.
Open R (if already running, need to restart for environment variable changes to take effect)
Set wd to Documents: setwd("~/")
install.packages("codetools")
# is this part of base R? might not need additional installation??
install.packages("remotes")
remotes::install_local("ROracle_1.3-2.tar.gz", repos = NULL, type = "source")
Hopefully, this all works. You will need package "DBI" as well.