Skip to content

Docs: columnsForPixelGroups() is a function, and its default includes B - #112

Open
eliotmcintire wants to merge 1 commit into
developmentfrom
fix/columnsForPixelGroups-doc
Open

Docs: columnsForPixelGroups() is a function, and its default includes B#112
eliotmcintire wants to merge 1 commit into
developmentfrom
fix/columnsForPixelGroups-doc

Conversation

@eliotmcintire

Copy link
Copy Markdown
Collaborator

Documentation only — one metadata string, no code path changes.

     expectsInput("columnsForPixelGroups", "character",
                  paste("The names of the columns in `cohortData` that define unique `pixelGroup`s.",
-                       "Default is `c('ecoregionGroup', 'speciesCode', 'age')`;",
-                       "see `?LandR::columnsForPixelGroups`).")),
+                       "Default is `c('ecoregionGroup', 'speciesCode', 'age', 'B')`;",
+                       "see `?LandR::columnsForPixelGroups()`).")),

Two corrections

1. Parens. LandR changed columnsForPixelGroups from a character vector to a function (R/cohorts.R:1741). The bare form in this docstring now points a reader at the function object rather than the thing they want. The module's own code at line 1731 already calls it correctly with parens — this just brings the prose in line.

2. The stated default was wrong, independent of the above. It claimed c('ecoregionGroup', 'speciesCode', 'age'), but LandR returns four columns:

columnsForPixelGroups <- function() {
  c("ecoregionGroup", "speciesCode", "age", "B")
}

"B" was missing. I noticed this while fixing the parens and corrected it in the same string rather than leave a known-false default sitting next to a line I was already touching. Happy to split it out if you would rather keep the changes separate.

Scope

Companion to PredictiveEcology/Biomass_core#108, which fixes the one genuine code site (Biomass_core.R:870 assigned the function object instead of calling it). I audited both modules across all branches plus the rest of the organisation; this docstring was the only remaining bare reference anywhere, and being prose it was harmless — hence docs-only here.

File parses clean.

Two corrections to one metadata string:

- add parens, since LandR made columnsForPixelGroups a function; the
  bare form in the docs now points at the function object.
- the stated default omitted "B". LandR::columnsForPixelGroups()
  returns c("ecoregionGroup", "speciesCode", "age", "B").

Documentation only; no code path changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant