Learn R Programming

searchAnalyzeR (version 0.1.0)

check_deps: Utility Functions for searchAnalyzeR Package

Description

This file contains general utility functions used throughout the package.

Usage

check_deps(required_packages, install_missing = FALSE)

Value

Logical vector indicating which packages are available

Arguments

required_packages

Character vector of required package names

install_missing

Logical, whether to suggest installing missing packages

Details

This function checks if required packages are installed using requireNamespace to check availability without loading packages. For CRAN compliance, this function does not automatically install packages.

Examples

Run this code
# Check if packages are available
required <- c("ggplot2", "dplyr")
availability <- check_deps(required)
print(availability)

# Get suggestions for missing packages
required_with_missing <- c("ggplot2", "dplyr", "nonexistent_package")
availability <- check_deps(required_with_missing, install_missing = TRUE)
print(availability)

Run the code above in your browser using DataLab