tidy-deprecate-function

Deprecate R functions and parameters with lifecycle warnings and documentation updates.

33|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/bbtheo/cuplyr --skill tidy-deprecate-function-bbtheo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tidy-deprecate-function
Source: https://github.com/bbtheo/cuplyr/tree/main/.claude/skills/tidy-deprecate-function
Command: npx skills add https://github.com/bbtheo/cuplyr --skill tidy-deprecate-function-bbtheo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires lifecycle, withr, devtools, air, and includes references (resource) components.

What problem does it solve?

This Skill provides a structured, step-by-step process for deprecating R functions or parameters, ensuring consistency, clear communication to users, and proper maintenance of R packages.

Core Features & Use Cases

  • Guided Deprecation Workflow: Follows best practices for marking functions/parameters as deprecated.
  • Automated Warnings: Integrates with lifecycle::deprecate_warn() to notify users.
  • Documentation Updates: Guides on updating Roxygen documentation with deprecation badges and examples.
  • Testing Integration: Includes steps for silencing existing tests and adding new tests for deprecation warnings.
  • NEWS.md Entries: Ensures proper logging of deprecation in package changelogs.
  • Use Case: When preparing to remove an older function in your R package, use this skill to systematically update its code, documentation, and tests to inform users and facilitate migration to a new replacement function.

Quick Start

Use the tidy-deprecate-function skill to deprecate the old_function() in favor of new_function().

Frequently Asked Questions about tidy-deprecate-function

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deprecate an R function using the lifecycle package?

To deprecate an R function, use the lifecycle package to implement deprecate_warn, update Roxygen documentation with badges, modify tests to suppress warnings, and add NEWS.md entries for clear user communication during the function deprecation transition.

What is the best way to warn users when deprecating parameters in an R package?

The best way to warn users during parameter deprecation is integrating lifecycle::deprecate_warn() within your R package code, which triggers automated warnings to notify users and guide them toward the replacement parameters.

How do I update Roxygen documentation for deprecated R functions?

You update Roxygen documentation for deprecated R functions by adding specific deprecation badges and migrating examples, ensuring the package documentation clearly communicates the lifecycle stage and directs users to alternative functions.

Do I need to modify package tests when deprecating R functions?

Yes, you need to modify package tests when deprecating R functions by silencing existing tests that trigger the new warnings and adding specific tests to verify the lifecycle deprecation warnings behave as expected.

Can I use devtools to manage R package deprecation workflows?

Yes, devtools is included as a dependency to support the R package development workflow, working alongside lifecycle and withr to systematically implement and test function deprecations within your package environment.