Compact Package Representations

A tool, grammar, and standard to represent and exchange R package source code as text files. Converts one or more source packages to a text file and restores the package structures from the file.


pkglite

R-CMD-check Codecov test coverage CRAN status CRAN Downloads

A tool, grammar, and standard to represent and exchange R package source code as text files. Converts one or more source packages to a text file and restores the package structures from the file.

  • To get started, see vignette("pkglite").
  • To generate file specifications, see vignette("filespec").
  • To curate file collections, see vignette("filecollection").
  • The text file format is described in vignette("format").

Installation

You can install the package via CRAN:

install.packages("pkglite")

Or, install from GitHub:

remotes::install_github("Merck/pkglite")

Workflow

library("pkglite")

Pack one R package:

"/path/to/package/" %>%
  collate(file_default()) %>%
  pack()

Pack multiple R packages:

pack(
  "/path/to/pkg1/" %>% collate(file_default()),
  "/path/to/pkg2/" %>% collate(file_default()),
  output = "/path/to/pkglite.txt"
)

Unpack one or more packages:

"/path/to/pkglite.txt" %>%
  unpack(output = "/path/to/output/")

Citation

If you use this software, please cite it as below.

Zhao, Y., Xiao, N., Anderson, K., & Zhang, Y. (2023). Electronic common technical document submission with analysis using R. Clinical Trials, 20(1), 89--92. https://doi.org/10.1177/17407745221123244

A BibTeX entry for LaTeX users is

@article{zhao2023electronic,
  title   = {Electronic common technical document submission with analysis using {R}},
  author  = {Zhao, Yujie and Xiao, Nan and Anderson, Keaven and Zhang, Yilong},
  journal = {Clinical Trials},
  volume  = {20},
  number  = {1},
  pages   = {89--92},
  year    = {2023},
  doi     = {10.1177/17407745221123244}
}

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("pkglite")

0.2.6 by Dickson Wanjau, 4 months ago


https://merck.github.io/pkglite/, https://github.com/Merck/pkglite


Report a bug at https://github.com/Merck/pkglite/issues


Browse source code at https://github.com/cran/pkglite


Authors: Nan Xiao [aut] , Yilong Zhang [aut] , Keaven Anderson [aut] , Amin Shirazi [ctb] , Jeff Cheng [ctb] , Danfeng Fu [ctb] , Benjamin Wang [aut] , Dickson Wanjau [aut, cre] , Merck & Co. , Inc. , Rahway , NJ , USA and its affiliates [cph]


Documentation:   PDF Manual  


GPL-3 license


Imports crayon, magrittr, remotes

Suggests covr, knitr, rmarkdown, testthat


See at CRAN