How we can get the list of installed packages by user in R along with its version?
I know about the command installed.packages()
which will give information
Here's my solution.
tibble::tibble(
Package = names(installed.packages()[,3]),
Version = unname(installed.packages()[,3])
)
You can even filter some packages that you want to show.
pkg = tibble::tibble(
Package = names(installed.packages()[,3]),
Version = unname(installed.packages()[,3])
)
dplyr::filter(pkg, Package %in% c("tibble", "dplyr"))
ref
ip = as.data.frame(installed.packages()[,c(1,3:4)])
ip = ip[is.na(ip$Priority),1:2,drop=FALSE]
ip
str(allPackage <- installed.packages(.Library, priority = "high"))
allPackage [, c(1,3:5)]
You will get all the active package List
I just found another ways to see the list of the packages without writing any code:
Help --> R Help
(from the menu above)Reference --> Packages
There you are.
OR
Help --> Html help
Reference --> Packages
If I develop an app or model and want to record the package versions used, I call sessionInfo()