Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Automatically fetch updated easystats citations instead of hardcoding in cite_easystats()#530

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
Copilot wants to merge4 commits intomain
base:main
Choose a base branch
Loading
fromcopilot/fix-529

Conversation

Copy link
Contributor

CopilotAI commentedSep 8, 2025
edited
Loading

This PR implements automatic citation fetching for thecite_easystats() function, eliminating the need for manual maintenance of hardcoded citation data.

Problem

Thecite_easystats() function previously relied on hardcoded citation strings and static bibliography files that required constant manual updates as package information changed. This led to outdated author lists, incorrect version numbers, and stale publication information.

Solution

The function now automatically fetches current citations using R's built-incitation() function for each package, ensuring citations are always up-to-date. The implementation includes:

  • Automatic citation generation: Usescitation(package) to get current article citations and generates software citations from package metadata
  • Improved formatting: Clean, readable citation format with "First Author et al." for packages with many authors
  • Graceful fallback: Falls back to hardcoded citations if automatic generation fails
  • Backward compatibility: Same function interface and output structure

Example

library(report)# Now automatically generates current citationsresult<- cite_easystats(packages= c("insight","bayestestR"),format="text")print(result)#> Citations#> ----------#> Analyses were conducted using the _easystats_ collection of packages#> (Lüdecke et al., 2019, 2019/2025, Makowski et al., 2019, 2019/2025).#>#> References#> ----------#> - Daniel Lüdecke et al. (2025). insight: Easy Access to Model Information#>     for Various Model Objects [R package]. https://CRAN.R-project.org/package=insight#> - Daniel Lüdecke, Philip Waggoner, Dominique Makowski (2019). {insight}: A Unified#>     Interface to Access Information from Model Objects in {R}.. Journal of Open#>     Source Software, 4(38), 1412. https://doi.org/10.21105/joss.01412#> ...

Key Benefits

  • Always current: Citations automatically reflect the latest package information
  • Version accuracy: Shows actual installed versions (e.g., 2025 for current packages)
  • Author precision: Uses exact author information from each package's DESCRIPTION file
  • Maintenance-free: No more manual updates to hardcoded citation strings

Testing

Added comprehensive test suite (tests/testthat/test-cite_easystats_automatic.R) covering:

  • Automatic citation generation accuracy
  • Graceful handling of missing packages
  • Citation format and content validation
  • Integration with existing functionality

All tests pass ✅

Fixes#529.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Clickhere to start the survey.

CopilotAIand others added3 commitsSeptember 8, 2025 02:14
Co-authored-by: rempsyc <13123390+rempsyc@users.noreply.github.com>
Co-authored-by: rempsyc <13123390+rempsyc@users.noreply.github.com>
Co-authored-by: rempsyc <13123390+rempsyc@users.noreply.github.com>
CopilotAI changed the title[WIP] Automatically fetch updated easystats citations instead of hardcoding incite_easystats()Automatically fetch updated easystats citations instead of hardcoding in cite_easystats()Sep 8, 2025
CopilotAI requested a review fromrempsycSeptember 8, 2025 02:25
Copilot finished work on behalf ofrempsycSeptember 8, 2025 02:25
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@rempsycrempsycAwaiting requested review from rempsyc

At least 1 approving review is required to merge this pull request.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Automatically fetch updated easystats citations instead of hardcoding incite_easystats()

2 participants

@rempsyc

[8]ページ先頭

©2009-2025 Movatter.jp