Skip to content

dplyr 1.0.8: avoid using matrices in filter()#5

Open
romainfrancois wants to merge 1 commit into
mwheymans:masterfrom
romainfrancois:filter_avoid_matrices
Open

dplyr 1.0.8: avoid using matrices in filter()#5
romainfrancois wants to merge 1 commit into
mwheymans:masterfrom
romainfrancois:filter_avoid_matrices

Conversation

@romainfrancois

Copy link
Copy Markdown

We're about to release dplyr 1.0.8 which is stricter about what is allowed in filter(). As part of running our rev dep checks we've identified that this package potentially fails with:

── After ─────────────────────────────────────────────────────────────────────────────────────────────────────
> checking examples ... ERROR
  Running examples in ‘psfmi-Ex.R’ failed
  The error most likely occurred in:
  
  > ### Name: pool_D4
  > ### Title: Pools the Likelihood Ratio tests across Multiply Imputed
  > ###   datasets ( method D4)
  > ### Aliases: pool_D4
  > 
  > ### ** Examples
  > 
  > 
  > fm0 <- Chronic ~ BMI + factor(Carrying) + 
  +   Satisfaction + SocialSupport + Smoking
  > fm1 <- Chronic ~ BMI + factor(Carrying) + 
  +   Satisfaction +  SocialSupport + Smoking +
  +   Radiation
  > 
  > psfmi::pool_D4(data=lbpmilr, nimp=10, impvar="Impnr",
  +                fm0=fm0, fm1=fm1, robust = TRUE)
  Error in `filter()`: Problem while computing `..1 = data[impvar] <= nimp`.
  ✖ Input `..1` must be a logical vector, not a logical[,1].
  Backtrace:
       ▆
    1. ├─psfmi::pool_D4(...)
    2. │ ├─dplyr::filter(data, data[impvar] <= nimp)
    3. │ └─dplyr:::filter.data.frame(data, data[impvar] <= nimp)
    4. │   └─dplyr:::filter_rows(.data, ..., caller_env = caller_env())
    5. │     └─dplyr:::filter_eval(dots, mask = mask, error_call = error_call)
    6. │       ├─base::withCallingHandlers(...)
    7. │       └─mask$eval_all_filter(dots, env_filter)
    8. ├─dplyr:::dplyr_internal_error(...)
    9. │ └─rlang::abort(class = c(class, "dplyr:::internal_error"), dplyr_error_data = data)
   10. │   └─rlang:::signal_abort(cnd, .file)
   11. │     └─base::signalCondition(cnd)
   12. └─dplyr `<fn>`(`<dpl:::__>`)
  Execution halted

> checking dependencies in R code ... NOTE
  Namespace in Imports field not imported from: ‘miceadds’
    All declared Imports should be used.

1 error x | 0 warnings ✓ | 1 note x

Please consider this pull request that should fix the issue.

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