tidy-deprecate-function

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

401|61|Updated Oct 30, 2017
One-click install
npx skills add https://github.com/tidymodels/yardstick --skill tidy-deprecate-function-tidymodels
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tidy-deprecate-function
Source: https://github.com/tidymodels/yardstick/tree/main/.claude/skills/tidy-deprecate-function
Command: npx skills add https://github.com/tidymodels/yardstick --skill tidy-deprecate-function-tidymodels

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill streamlines the process of deprecating R functions and arguments, ensuring consistency and adherence to best practices within R package development.

Core Features & Use Cases

  • Guided Deprecation Workflow: Provides a step-by-step process for deprecating R functions or parameters.
  • Automated Warnings & Documentation: Integrates with lifecycle package to add deprecation warnings and update documentation.
  • Test Integration: Guides the addition of new tests for deprecation warnings and modification of existing tests.
  • Use Case: When a function in an R package is outdated and needs to be replaced, this Skill ensures all necessary steps are taken to inform users and maintain the package's quality.

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 in a package?

To deprecate an R function, add lifecycle warnings, update documentation with badges, and modify tests. This ensures users are informed while maintaining package quality during the transition.

How do I add deprecation warnings to R package arguments?

Add deprecation warnings to R arguments using the lifecycle package. This Skill guides modifying function signatures and injecting warnings so users receive clear signals when using outdated parameters.

What is the best way to manage R package lifecycle and deprecation?

Managing R package lifecycle involves adding lifecycle badges, updating NEWS.md entries, and handling version management. This ensures comprehensive deprecation practices and clear communication of breaking changes.

How do I test deprecation warnings in R packages?

Test deprecation warnings in R packages by modifying existing tests and adding new ones. This verifies that lifecycle warnings trigger correctly when deprecated functions or arguments are called.

Do I need the lifecycle package to deprecate R functions?

Yes, the lifecycle package is required to deprecate R functions. It provides the necessary functions to implement soft-deprecation, warnings, and error stages for outdated code.

Can I update R documentation and NEWS.md during function deprecation?

Yes, you can update R documentation and NEWS.md during function deprecation. This Skill guides adding lifecycle badges to docs and managing version entries to document the changes comprehensively.