Skip to content

KWB-R/kwb.code

Repository files navigation

R-CMD-check pkgdown codecov lifecycle CRAN_Status_Badge DOI R-Universe_Status_Badge

kwb.code

This package allows you to parse your R scripts and to calculate some staticstics on your code.

Installation

Install the package from Github:

#install.packages("remotes")
remotes::install_github("kwb-r/kwb.code")

Basic Usage

If you have a lot of R scripts and you want to know what different packages are loaded from within your scripts, you may use the function get_names_of_used_packages:

# Set path to directory in which to look recursively for R scripts
root_dir <- "~/Desktop/R-Development"

# Get the names of used packages  
packages <- kwb.code::get_names_of_used_packages(root_dir)

# Show the names of the packages
packages

Documentation

Release: https://kwb-r.github.io/kwb.code

Development: https://kwb-r.github.io/kwb.code/dev