Skip to content

Change BFInfo to use fields option of packageDescription() - #175

Open
elinw wants to merge 1 commit into
richarddmorey:masterfrom
elinw:version
Open

Change BFInfo to use fields option of packageDescription()#175
elinw wants to merge 1 commit into
richarddmorey:masterfrom
elinw:version

Conversation

@elinw

@elinw elinw commented Jun 14, 2026

Copy link
Copy Markdown

BFInfo is currently causing an error on some builds of the effectsize package.

https://cloud.r-project.org/web/checks/check_results_effectsize.html

Quitting from xtabs.Rmd:207-215 [unnamed-chunk-13]
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  <error/rlang_error>
  Error in `packageDescription("BayesFactor")$Version`:
  ! $ operator is invalid for atomic vectors
  ---
  Backtrace:
      ▆
   1. └─BayesFactor::contingencyTableBF(RCT_table, sampleType = "jointMulti")
   2.   └─BayesFactor:::BFcontingencyTable(...)
   3.     ├─methods::new(...)
   4.     │ ├─methods::initialize(value, ...)
   5.     │ └─methods::initialize(value, ...)
   6.     └─BayesFactor::BFInfo(FALSE)
   7.       └─base::paste(packageDescription("BayesFactor")$Version)
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
  Error: processing vignette 'xtabs.Rmd' failed with diagnostics:
  $ operator is invalid for atomic vectors

This can be resolved by using the fields option of packageDescription().

packageDescription("BayesFactor", fields = "Version")

rather than the $ notation.

Don't use $ notation for version. Instead, use the fields option of `packageDescription()`
@richarddmorey

Copy link
Copy Markdown
Owner

Thanks - I'll check this out very soon.

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.

2 participants