InstallR error: R.DLL version does not match

Hi,
when installing R from

InstallR["RHomeLocation" -> "C:\\Program Files\\R\\R-4.2.1"]

I am getting this :

Error: R.DLL version does not match(DLL:4.2.1, expecting:4.1.1)

hope not to downgrade to 4.1.1

Thanks,

Asad

Apparently Mathematica needs to know explicitly about each version of R. Look at the Mathematica folder for your operating system which for me is

C:\Program Files\Wolfram Research\Mathematica\13.1\SystemFiles\Links\RLink\SystemFiles\Libraries\Windows-x86-64

You’ll see folders named 3.0.0 to 4.1.2. But no 4.2.2. All have a file named jri.dll. (Unfortunately making a copy of the 4.1.2 folder and then renaming it to 4.2.2 doesn’t cut it.)

So asking Wolfram, Inc. for a 4.2.2 folder with the corresponding jri.dll or installing a copy of 4.1.2 seems to be the only immediate choice (unless there’s a quick fix to an existing jri.dll file).