Skip to content

❇️Refactor use of assign() in functions #445

Description

@michellesloan-cdc

During recent PRs, GitGub Actions flagged that we use assignments to the global environment. This is not considered best practice in R; functions should generally return values explicitly instead of modifying the global environment.

A refactor of this approach should be developed and implemented to remove these global assignments where possible. Known functions are init_dr() in dr.main.functions.R and init_kpi() in kpi.main.functions.R. A search across the package should be conducted to ensure there are no others.

See example failure report here : https://github.com/CDCgov/sirfunctions/actions/runs/24412292486/job/71317419237

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions