Got it. We are very close to fixing this issue. Your diagnosis has been going very well. Please hold on a bit.
So I found two groups of packages, as you have said.
User Library and System Library.
And there are 4 paths.
> .libPaths()
[1] "/home/sanjay/R/x86_64-pc-linux-gnu-library/4.2"
[2] "/usr/local/lib/R/site-library"
[3] "/usr/lib/R/site-library"
[4] "/usr/lib/R/library"
I did some digging using installed.packages()
and here are two results.
Checking total packages in each of the 4 libpaths,
1:4 |> map_dbl(~installed.packages(lib.loc = .libPaths()[.x]) |> nrow() )
outputs
[1] 162 41 160 29
This shows that paths 1 & 3 have almost a half / half split of the 320 odd packages. This looks like a problem to me.
Further investigating the intersecting package names across the 4 libraries,
packnames <- 1:4 |> map(~installed.packages(lib.loc = .libPaths()[.x])[,1] )
intersect(packnames[[1]],packnames[[2]])
[1] "hardhat" "parsnip" "xts"
> intersect(packnames[[2]],packnames[[3]])
character(0)
> intersect(packnames[[3]],packnames[[4]])
character(0)
> intersect(packnames[[1]],packnames[[4]])
[1] "Matrix"
> intersect(packnames[[2]],packnames[[4]])
character(0)
> intersect(packnames[[1]],packnames[[3]])
[1] "callr" "fontawesome" "htmltools" "pillar" "processx" "ps" "Rcpp" "rlang" "tibble"
>
So there are very few overlaps.
Checking the distribution of shiny related packages
> packnames[[1]] |> str_subset("shiny")
[1] "shinyalert" "shinyBS" "shinycssloaders" "shinydashboardPlus" "shinyTime"
[6] "shinyWidgets"
>
> packnames[[2]] |> str_subset("shiny")
character(0)
>
> packnames[[3]] |> str_subset("shiny")
[1] "shiny" "shinydashboard" "shinyjs"
>
> packnames[[4]] |> str_subset("shiny")
character(0)
>
This shows that 3 packages are in /usr/lib/R/site-library
while all other shiny related packages are in /home/sanjay/R/x86_64-pc-linux-gnu-library/4.2
Do you think I should just live with this, or move back the shiny packages from /usr/lib/R/site-library
to /home/sanjay/R/x86_64-pc-linux-gnu-library/4.2
?
What should be my main action now?