Skip to content

Enhancement: Re-document & test output_get() (Eurostat P1 Output) #38

@antaldaniel

Description

@antaldaniel

Problem

  • output_get() currently wraps primary_input_get() (semantic mismatch).
  • Roxygen mentions “multipliers” and doesn’t align with Eurostat P1 definition.
  • Direct positional indexing ([, 1]) discards column names, may coerce factors oddly, and can trigger unintended recycling.

Proposal

  1. Make output_get() a dedicated helper that selects the Output (P1) row
    (accept "output", "output_bp", "P1", "p1") without calling
    primary_input_get().
  2. Update roxygen to Eurostat terms:
    • “Output (P1) at basic prices”
    • Clarify it’s not a primary input
    • Return: one-row data frame (key + numeric columns).
  3. Add concise tests (testthat 3e):
    • One row returned; first column is key; all non-key cols numeric
    • Label ∈ {output, output_bp, P1, p1}
    • No NAs in returned row.
  4. (Optional follow-up) Consider renaming primary_input_get() to
    primary_inputs_get() (or value_added_get()) to avoid confusion.

Acceptance

  • Documentation follows rOpenSci markdown style; ≤80-char code lines.
  • New tests pass on package demo data.
  • No tidyselect warnings.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions