Skip to content

Show plot() usage in n_factors() examples#1205

Merged
strengejacke merged 3 commits intomainfrom
copilot/show-plot-method-in-examples-for-n-factors
Apr 14, 2026
Merged

Show plot() usage in n_factors() examples#1205
strengejacke merged 3 commits intomainfrom
copilot/show-plot-method-in-examples-for-n-factors

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 3, 2026

n_factors() documents that a plot() method exists via see, but the examples did not demonstrate it. This updates the examples so users can discover the plotting workflow directly from the function docs.

  • Documentation

    • Added a guarded plot(result) example to n_factors() so the existing visualization method is shown alongside as.data.frame() and summary().
    • Kept the example conditional on see being installed.
  • Generated docs

    • Synced man/n_factors.Rd with the roxygen change.
  • Package metadata

    • Bumped the development version in DESCRIPTION for this user-visible documentation update.
result <- n_factors(mtcars[1:5], type = "FA")
as.data.frame(result)
summary(result)

if (require("see", quietly = TRUE)) {
  plot(result)
}

Agent-Logs-Url: https://github.com/easystats/parameters/sessions/ffe1fac9-e7bb-45d7-be07-e065b5a504f7

Co-authored-by: DominiqueMakowski <8875533+DominiqueMakowski@users.noreply.github.com>
Copilot AI changed the title [WIP] Add plot() method examples for n_factors Show plot() usage in n_factors() examples Apr 3, 2026
Copilot AI requested a review from DominiqueMakowski April 3, 2026 19:02
@DominiqueMakowski DominiqueMakowski marked this pull request as ready for review April 10, 2026 13:37
Copilot AI review requested due to automatic review settings April 10, 2026 13:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates n_factors() documentation so users can discover and use the existing plot() method directly from the function examples, with the plotting example guarded on see being available.

Changes:

  • Added a conditional plot(result) example to n_factors() roxygen examples (guarded by require("see", quietly = TRUE)).
  • Regenerated man/n_factors.Rd to match the roxygen example update.
  • Bumped the development version in DESCRIPTION for this user-visible documentation change.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
R/n_factors.R Adds a guarded plot() example to demonstrate the visualization workflow for n_factors() results.
man/n_factors.Rd Syncs the rendered Rd examples with the roxygen update.
DESCRIPTION Increments package version to reflect the documentation change.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@strengejacke strengejacke merged commit ca2001e into main Apr 14, 2026
11 of 20 checks passed
@strengejacke strengejacke deleted the copilot/show-plot-method-in-examples-for-n-factors branch April 14, 2026 12:02
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.

Show plot() method in examples for n_factors

4 participants