Learn R Programming

⚠️There's a newer version (0.2.3) of this package.Take me there.

pkglite

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 create file specifications, see vignette("filespec").
  • 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/")

Copy Link

Version

Install

install.packages('pkglite')

Monthly Downloads

736

Version

0.1.1

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Nan Xiao

Last Published

March 8th, 2021

Functions in pkglite (0.1.1)

file_spec

Create a file specification
ext_binary

Common file extensions (binary)
file_auto

File specification (automatic guess)
is_file_collection

Is this a file collection object?
ext_text

Common file extensions (text)
collate

Evaluate a list of file specifications
file_name_patterns

Common File name patterns
file_spec_templates

File specification templates
file_default

File specification (default combination)
file_ectd

File specification (eCTD submission)
unpack

Unpack packages from a text file
remove_content

Remove content lines from a pkglite file
verify_ascii

Check if a file contains only ASCII characters
print.file_spec

Print a file specification
print.file_collection

Print a file collection
%>%

Pipe operator
pack

Pack packages into a text file
is_file_spec

Is this a file specification object?
pkglite-package

pkglite: Compact Package Representations
sanitize_file_collection

Sanitize file collection