Skip to content

Commit

Permalink
packages to list for adrg
Browse files Browse the repository at this point in the history
  • Loading branch information
laxamanaj committed Feb 12, 2024
1 parent aba086a commit bd0bf44
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions submission/pkgs4adrg.r
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#List out packages used for R analysis in the adrg.pdf

library(tidyr)
library(data.table)

pkgloaded <- sessionInfo()$loadedOnly #get intial list of packages that were loaded
pkgother <- sessionInfo()$otherPkgs #get initla list of packages that were also listed in the Session but may not have been used

loaded <- data.frame(rbindlist(pkgloaded, idcol = TRUE, fill=T)) %>%
select(Package, Title, Version, Description) %>%
mutate(loaded='Y')
other <- data.frame(rbindlist(pkgother, idcol = TRUE, fill=T)) %>%
select(Package, Title, Version, Description) %>%
mutate(loaded='N')

pkgdesc <- bind_rows(loaded, other) # stacks all package data frames.
# NOTE column 'loaded', from this data frame can be used to subset out packages not used and may not be needed for the adrg.pdf

# update path to save CSV in your local area.
write.csv(pkgdesc, "/cloud/project/submission/pkgs4adrg.csv", row.names=FALSE)

0 comments on commit bd0bf44

Please sign in to comment.