-
Notifications
You must be signed in to change notification settings - Fork 14
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Over Conflicted? #110
Comments
Anything is possible, but the place to start would be with a reprex. |
So this is what seems to be happening library(conflicted)
library(data.table)
library(tidyverse)
library(dynamite)
fit <- dynamite(
dformula = obs(y ~ -1 + varying(~x), family = "gaussian") +
lags(type = "varying") +
splines(df = 20),
gaussian_example,
"time",
"id",
chains = 1,
refresh = 0
)
#> Error:
#> ! [conflicted] between found in 2 packages.
#> Either pick the one you want with `::`:
#> • dplyr::between
#> • data.table::between
#> Or declare a preference with `conflicts_prefer()`:
#> • `conflicts_prefer(dplyr::between)`
#> • `conflicts_prefer(data.table::between)` Created on 2024-04-14 with reprex v2.1.0 And my understanding is that the situation is unexpected to the authors of My (their) guess is that |
That suggests that dynamite is evaluating the generated code in the global environment. If you look at the traceback:
It's likely to be something to do with the way they're using |
Sorry for the late reply. Perhaps this is a separate issue, but the library(conflicted)
library(dplyr)
apropos("f", mode = "S4")
#> Error:
#> ! [conflicted] filter found in 2 packages.
#> Either pick the one you want with `::`:
#> • dplyr::filter
#> • stats::filter
#> Or declare a preference with `conflicts_prefer()`:
#> • `conflicts_prefer(dplyr::filter)`
#> • `conflicts_prefer(stats::filter)` Created on 2024-07-26 with reprex v2.1.0 Is it the same issue? |
The problem is that when you set a mode in |
Sorry again for the late reply. If I understand what's happening, so then would the solution to either be to change Perhaps unsurprisingly, it doesn't seem like base R has a Github repo where I could post this kind of issue and I don't have the bandwidth to dig in the Should I close the issue unless someone would like to take this up? While it is an unfortunate interaction, it seems like a complicated problem. It seems like the only workaround would be to essentially not use |
If you're hitting this problem because RStan is using |
That may be it |
So I don't know if it's valid to re-open the issue, but it's worth mentioning that the same kind of issue happens in I'll link the discussion with the library(brms)
#> Loading required package: Rcpp
#> Loading 'brms' package (version 2.20.4). Useful instructions
#> can be found by typing help('brms'). A more detailed introduction
#> to the package is available through vignette('brms_overview').
#>
#> Attaching package: 'brms'
#> The following object is masked from 'package:stats':
#>
#> ar
library(conflicted)
library(reprex)
# From Example Documentation
prior1 <- prior(normal(0,10), class = b) +
prior(cauchy(0,2), class = sd)
fit1 <- brms::brm(count ~ zAge + zBase * Trt + (1|patient),
data = epilepsy, family = poisson(), prior = prior1)
#> Compiling Stan program...
#> Error:
#> ! [conflicted] ar found in 2 packages.
#> Either pick the one you want with `::`:
#> • brms::ar
#> • stats::ar
#> Or declare a preference with `conflicts_prefer()`:
#> • `conflicts_prefer(brms::ar)`
#> • `conflicts_prefer(stats::ar)` Created on 2024-10-23 with reprex v2.1.1 |
I guess I'm also wondering--if I had run |
Never mind, it's because of |
Hello,
This is related to this issue--is it possible that
conflicted
might be over-alerting?I'm not entirely sure I understand what's going on--and I might be butchering my comp-sci--but it seems like it's detecting conflicts between the namespace of
tidyverse
anddata.table
, which is caused by some downstream effect of whatever codedynamite
is running. Is this possibly a false conflict or is it an actual cause for concern?The text was updated successfully, but these errors were encountered: