Get the list of installed packages by user in R

后端 未结 5 1152
忘了有多久
忘了有多久 2021-01-30 08:58

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

相关标签:
5条回答
  • 2021-01-30 09:04

    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"))
    
    0 讨论(0)
  • 2021-01-30 09:08

    ref

    ip = as.data.frame(installed.packages()[,c(1,3:4)])
    ip = ip[is.na(ip$Priority),1:2,drop=FALSE]
    ip
    
    0 讨论(0)
  • 2021-01-30 09:14
    str(allPackage <- installed.packages(.Library, priority = "high"))
    
    allPackage [, c(1,3:5)]
    

    You will get all the active package List

    0 讨论(0)
  • 2021-01-30 09:16

    I just found another ways to see the list of the packages without writing any code:

    • Open RStudio
    • Navigate to Help --> R Help (from the menu above)
    • You will see the help panel opened.
    • Then follow, Reference --> Packages

    There you are.


    OR

    • Open R console
    • Navigate to Help --> Html help
    • Then follow, Reference --> Packages
    0 讨论(0)
  • 2021-01-30 09:22

    If I develop an app or model and want to record the package versions used, I call sessionInfo()

    0 讨论(0)
提交回复
热议问题