This R package simplifies the process of managing multiple R packages with functions to extract, install, load, and uninstall packages in bulk based on library() calls.
- Batch Installation: Install multiple missing packages and provide user prompts for confirmation.
- Batch Loading: Load all specified packages with error handling.
- Batch Uninstallation: Uninstall multiple packages with user confirmation.
library(devtools)
install_github("yulexun/bulkpkginstall")
Installs and loads R packages from a string containing library() calls.
librarylines
: A string of R code withlibrary()
calls.
- Checks for missing packages.
- Prompts the user to install missing packages.
- Optionally loads all packages.
Uninstalls packages based on a string of library() calls.
librarylines
: A string of R code withlibrary()
calls.
- Identifies installed packages.
- Prompts the user to confirm uninstallation.
- Uninstalls specified packages.
# Example library() calls as a string
library_lines <- "
library(ggplot2)
library(dplyr)
library(tidyverse)
"
# Install and load packages
binstall(library_lines)
# Uninstall packages
buninstall(library_lines)
This project is licensed under the MIT License. See the LICENSE.txt
file for details.