Skip to content

Script to update all R packages from source, rebuild outdated ones, and retry using binaries if any packages fail to build from source.

License

Notifications You must be signed in to change notification settings

b1azk0/updateRpkg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

updateRpkg

R Version

Changelog

v0.2.4

  • Improved version tracking for package rebuilds
  • Enhanced R version compatibility checking
  • Optimized rebuild process to avoid unnecessary updates
  • Fixed version tracking issues

v0.2.3

  • Added proper error handling and fallback mechanisms
  • Implemented smart rebuild tracking to avoid unnecessary rebuilds
  • Added binary fallback when source build fails
  • Enhanced logging system
  • Added package version locking functionality

v0.2.2

  • Initial release with basic update functionality
  • Source package installation support
  • Basic error handling License

A robust R package designed to streamline the process of updating and rebuilding installed R packages with enhanced error handling and fallback mechanisms.

Overview

updateRpkg provides automated tools for:

  • Updating R packages from source installations
  • Identifying and rebuilding packages compiled with different R versions
  • Automatic fallback to binary installations when source builds fail
  • Detailed post-run summary reports
  • Version compatibility checking
  • Package dependency validation
  • Self-update checking

Installation

# Install from GitHub
devtools::install_github("b1azk0/updateRpkg")

# Install directly in R
devtools::install()

Usage

# Load the package
library(updateRpkg)

# Update all installed packages
updateRpackages()

# Update specific packages
updatePackages(c("dplyr", "ggplot2"))

# Rebuild outdated packages only
rebuildPackages()

Features

  • Source-First Updates: Prioritizes source installations for better compatibility
  • Automatic Fallback: Switches to binary installations if source builds fail
  • Version Compatibility: Detects packages built with different R versions
  • Progress Tracking: Reports successful and failed updates
  • Error Handling: Robust error management with detailed error messages and automatic fallback
  • Smart Rebuilding: Tracks already rebuilt packages to avoid unnecessary rebuilds
  • Version Tracking: Intelligent version comparison and build status tracking
  • Version Checking: Pre-update version comparison to avoid unnecessary updates
  • Detailed Summary Reports: Comprehensive post-run summaries
  • Parallel Processing: Optimized parallel installation support
  • Self-Update Check: Automatically checks for newer versions of the updater

Function Documentation

updateRpackages()

Main function that handles the complete package update process:

  • Checks for updates to the updater itself
  • Updates installed packages
  • Rebuilds outdated packages
  • Provides detailed success/failure reporting

updatePackages(packages = NULL)

Updates specific packages or all installed packages:

  • Checks current versions before updating
  • Attempts source installation first
  • Falls back to binary if source fails
  • Returns detailed status for each package

rebuildPackages(rebuild_all = FALSE)

Rebuilds R packages with flexible options:

  • rebuild_all = FALSE: Rebuilds only packages compiled with different R versions
  • rebuild_all = TRUE: Rebuilds all installed packages
  • Rebuilds from source with binary fallback
  • Returns rebuild status for each package

checkUpdaterVersion()

Checks if a newer version of updateRpkg is available:

  • Compares installed and available versions
  • Returns version information and update status

License

This package is licensed under the MIT License.

About

Script to update all R packages from source, rebuild outdated ones, and retry using binaries if any packages fail to build from source.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages