Skip to contents

1 Install R package

installed_packages <- rownames(installed.packages())

if(!"devtools" %in% installed_packages) {
  install.packages("devtools", repos = "https://cloud.r-project.org")
}
if(!"kwb.pkgstatus" %in% installed_packages) {
  devtools::install_github("KWB-R/kwb.pkgstatus")
}

2 How to check KWB R package status

2.1 Parameterise

Define path to secrets.csv and define repositories for the Github organisation KWB-R which are not R packages and save them in a variable called non_r_packages. Then call the

secrets_csv <- "secrets.csv"

non_r_packages <- kwb.pkgstatus::get_non_r_packages()

2.2 Get dataframe of R package status information

Run the function kwb.pkgstatus::prepare_status_rpackages with parameters defined above:

pkgstatus_df <- kwb.pkgstatus::prepare_status_rpackages(secrets_csv, 
                                                        non_r_packages)

head(pkgstatus_df)

2.3 Create R package status report

Run the function kwb.pkgstatus::create_report_rpackages with parameters defined above:


temp_dir <- temp()

cat(sprintf("Save report in temp folder:\n", temp_dir))
kwb.pkgstatus::create_report_rpackages(secrets_csv, 
                                       non_r_packages, 
                                       export_dir = temp_dir)
)