Reputation: 1609
Root of problem:
My environment is RevoREnt 7.3 that is tied with R 3.1.1.
I need to install tidyr
package. tidyr
needs DBI
package.
I installed/loaded DBI (v0.5). R gave warning:
Warning message:
package ‘DBI’ (0.5) was built under R version 3.3.1
After installing/loading DBI (v0.5), my search help function was corrupted with error: i.e.,
"?? yay
"in R console gave the following error:
"Error in `[<-`(`*tmp*`, , "name", value = sub("\\.[^.]*$", "", basename(vDB$File))) : subscript out of bounds"
Then, instead of Uninstall/Reinstall RevoREnt, I decided to save my broken RevoREnt (noticing that there are many R user facing corrupted search help function without any solution to mend).
I unload/uninstall DBI from R console, then I deleted the folder of DBI package from R library location via Windows Explorer. I re-run RevoREnt and write "??yay" in console:
My Help Browser (http://127.0.0.1:27971/doc/html/Search?pattern=yay) was opened
"The search string was "yay". No results found." appeared there.
That is: I saved my search help function without uninstalling/Re-installing RevoREnt.
What I did to solve/find:
1. Since I very needeed tidyr package, I decided to install/load DBI package that is compatible with my R 3.1.1. I went CRAN DBI (https://cran.r-project.org/web/packages/DBI/index.html)
There, it writes "Depends: R (≥ 2.15.0)
" in DBI page.
Does this mean that DBI (v0.5) was built under R2.15.0?
2. I went to DBI's archieve: https://cran.r-project.org/src/contrib/Archive/DBI/
Tried to find one by one loading and checking the warnings in R console:
Warning message:
package ‘DBI’ (0.5) was built under R version 3.3.1
Warning message:
package ‘DBI’ (0.4) was built under R version 3.1.3
Warning message:
package ‘DBI’ (0.3.1) was built under R version 3.1.2
Eventually, by trial and error, I found DBI 0.3.1 does not corrupt my search help function though it is built under 3.1.2>3.1.1!
Then, I reversed back. This time DBI 0.4 also did not corrupt search help function unexpectedly. DBI 0.5 always continued to corrupt the search help function.
Isn't there any simple way of finding R version under which the packages were built?
Upvotes: 2
Views: 2259
Reputation: 1069
The information you want is in the last column ("Built") of the output of installed.packages()
, per https://stat.ethz.ch/R-manual/R-devel/library/utils/html/installed.packages.html.
.libPaths() # get the library location
installed.packages(lib.loc = "C://Revolution//R-Enterprise-7.3//R-3.1.1//library")
Upvotes: 3