Package 'collidr'

Title: Check for Namespace Collisions with Other Packages and Functions on CRAN
Description: Check for namespace collisions between a string input (your function or package name) and a quarter of a million packages and functions on CRAN.
Authors: Steve Condylios [aut, cre]
Maintainer: Steve Condylios <[email protected]>
License: MIT + file LICENSE
Version: 0.1.1
Built: 2024-11-12 05:11:04 UTC
Source: https://github.com/collidrpackage/collidr

Help Index


collidr: Check for Namespace Collisions with Functions and Packages on CRAN

Description

collidr: Check for Namespace Collisions with Functions and Packages on CRAN

Details

It has the goal of providing a convenient and native way of checking for namespace collisions when writing functions and packages.

Author(s)

Steve Condylios [email protected]


Check for Namespace Collisions

Description

Check for namespace collisions with functions and packages on CRAN

Usage

CRAN_collisions(function_or_package_name, CRANdf)

Arguments

function_or_package_name

A character string, or vector of character strings.

CRANdf

Optionally provide an updated CRAN data.frame (obtain with getCRAN())

Examples

# Test single function name
function_or_package_name <- "a3.r2"
CRAN_collisions(function_or_package_name)

# Test multiple function names
function_or_package_name <- c("a3.r2", "xtable.A3")
CRAN_collisions(function_or_package_name)

# Test single package name
function_or_package_name <- "dplyr"
CRAN_collisions(function_or_package_name)

# Test multiple package names
function_or_package_name <- c("dplyr", "data.frame", "gsubfn")
CRAN_collisions(function_or_package_name)

Check for Namespace Collisions

Description

Check for namespace collisions with functions on CRAN

Usage

CRAN_function_collisions(function_name, CRANdf)

Arguments

function_name

A character string, or vector of character strings.

CRANdf

Optionally provide an updated CRAN data.frame (obtain with getCRAN())

Examples

# Test single function name
function_name <- "a3.r2"
CRAN_function_collisions(function_name)

# Test multiple function names
function_name <- c("a3.r2", "xtable.A3")
CRAN_function_collisions(function_name)

Show the functions that are on CRAN

Description

Show functions from CRAN.

Usage

CRAN_functions(CRANdf)

CRANf(CRANdf)

Arguments

CRANdf

Optionally provide an updated CRAN data.frame (obtain with getCRAN())

Examples

# Show CRAN functions
CRAN_functions()

Check for Namespace Collisions

Description

Check for namespace collisions with packages on CRAN

Usage

CRAN_package_collisions(package_name, CRANdf)

Arguments

package_name

A character string, or vector of character strings.

CRANdf

Optionally provide an updated CRAN data.frame (obtain with getCRAN())

Examples

# Test single package name
package_name <- "dplyr"
CRAN_package_collisions(package_name)

# Test multiple package names
package_name <- c("dplyr", "data.frame", "gsubfn")
CRAN_package_collisions(package_name)

Show the packages that are on CRAN

Description

Show a list of packages on CRAN.

Usage

CRAN_packages(CRANdf)

CRANp(CRANdf)

Arguments

CRANdf

Optionally provide an updated CRAN data.frame (obtain with getCRAN())

Examples

# Show CRAN packages
CRAN_packages()

Show the packages and functions that are on CRAN

Description

Show functions from CRAN.

Usage

CRAN_packages_and_functions(CRANdf)

CRANpf(CRANdf)

Arguments

CRANdf

Optionally provide an updated CRAN data.frame (obtain with getCRAN())

Examples

# Show CRAN packages and functions
CRAN_packages_and_functions()

CRAN Package and Function Data: 1 May 2019

Description

Package and function data from The Comprehensive R Archive Network

Usage

data(CRANdf)

Format

An object of class data.frame with 294190 rows and 2 columns.

Source

The Comprehensive R Archive Network, <https://cran.r-project.org/web/packages/available_packages_by_name.html>

Examples

data(CRANdf)
packages <- CRANdf$package_names
functions <- CRANdf$function_names

Retrieve a more up to date data.frame of packages and functions from CRAN

Description

Retrieve a more up to date data.frame of packages and functions from CRAN

Usage

getCRAN(last_updated, api_key)

Arguments

last_updated

Set to TRUE to return the timestamp of the last update to the CRAN database file. Access via attributes()

api_key

An API key for collidr-api

Examples

## Not run: 
# Retrieve CRAN functions
CRAN_updated <- getCRAN()

## End(Not run)