Commit 91d6d11
#17: preserve user's site library when prepending project lib
B-Nilson clarified the original report: `.libPaths(lib)` with a
single argument causes R to drop the user's site library
(`~/R/x86_64-pc-linux-gnu-library/4.x` on Linux, similar elsewhere)
in favour of `[lib, system_lib]` only. Packages the user installed
into their site library become invisible inside the project.
Switch to `.libPaths(unique(c(lib, .libPaths())))`: prepend the
project library (so it still wins resolution) while preserving
whatever paths R had already set up. The dedupe collapses the
common case where lib was already on the path.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>1 parent 6a9d36d commit 91d6d11
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
153 | 158 | | |
154 | 159 | | |
155 | 160 | | |
| |||
0 commit comments