Skip to content

Document memory management for leverage_sketch #31

@natalie-23-gill

Description

@natalie-23-gill

Problem

A common issue new users run into is sketching data with leverage_sketch() but keeping the original large object in memory:

sketched <- leverage_sketch(big_obj, sketch_size = 10000)
# big_obj is still in memory, doubling RAM usage!

Proposal

  • Add a @details section to leverage_sketch documenting the idiomatic pattern: input <- leverage_sketch(input, ...) (overwrite in place)
  • Add a prominent note in the vignette about freeing the original object
  • Consider adding a cli::cli_alert_warning() after sketching reminding users to remove the original object

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions