Giter Club home page Giter Club logo

cranlike's Introduction

cranlike

Tools for CRAN-like Repositories

Project Status: Active - The project has reached a stable, usable state and is being actively developed. CRAN RStudio mirror downloads R-CMD-check Codecov test coverage

A set of functions to manage CRAN-like repositories efficiently. This package is an alternative to tools::write_PACKAGES. The goal is to make updates to the repository easier and faster, without the need of scanning all the package files.

cranlike keeps the package data in a SQLite database, in addition to the PACKAGES* files. This database is the canonical source of the package data. It can be updated quickly, to add and remove packages. The PACKAGES* files are generated from the database.

Installation

install.packages("cranlike")

Usage

library(cranlike)

Setting up a repository

create_empty_PACKAGES creates an empty CRAN-like repository in the specified directory. It creates the SQLite database (if it does not exist), and also the PACKAGES* files.

update_PACKAGES is similar, but it also scans the directory for package files, and adds them to the database. Use this function on an existing CRAN-like repository. It creates and updates the database, and then the PACKAGES* files.

Adding and removing packages

add_PACKAGES adds one or more package files to the repository. The files must already exist in the directory. The database is created if needed, and then updated with the new packages. Then the PACKAGES* files will be re-generated.

remove_PACKAGES removes one or more package files from the repository. It first removes them from the database, and then removes the files from the directory. Finally, it re-generates the PACKAGES* files.

Listing packages

package_versions lists all packages in the repository. It uses the SQLite database instead of parsing the PACKAGES* files, so it is much faster.

License

GPL Version 2 or higher © R Consortium

cranlike's People

Contributors

gaborcsardi avatar

Watchers

James Cloos avatar CRAN robot avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.