Skip to content
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

Warning about deprecated arguments / usage in book chapter #249

Closed
strengejacke opened this issue Aug 4, 2024 · 1 comment · Fixed by #250
Closed

Warning about deprecated arguments / usage in book chapter #249

strengejacke opened this issue Aug 4, 2024 · 1 comment · Fixed by #250

Comments

@strengejacke
Copy link

Great book! When reading the DAG chapter, I realized there was a warning, which can likely be avoided when updating the code? See here:

https://www.r-causal.org/chapters/05-dags#dags-in-r

podcast_dag <- [dagify](https://r-causal.github.io/ggdag/reference/dagify.html)(
  podcast ~ mood + humor + prepared,
  exam ~ mood + prepared,
  coords = [time_ordered_coords](https://r-causal.github.io/ggdag/reference/time_ordered_coords.html)(
    [list](https://rdrr.io/r/base/list.html)(
      # time point 1
      [c](https://rdrr.io/r/base/c.html)("prepared", "humor", "mood"),
      # time point 2
      "podcast",
      # time point 3
      "exam"
    )
  ),
  exposure = "pod[c](https://rdrr.io/r/base/c.html)ast",
  outcome = "exam",
  labels = c(
    podcast = "podcast",
    exam = "exam score",
    mood = "mood",
    humor = "humor",
    prepared = "prepared"
  )
)
[ggdag](https://r-causal.github.io/ggdag/reference/ggdag.html)(podcast_dag, use_labels = "label", text = FALSE) +
  [theme_dag](https://r-causal.github.io/ggdag/reference/theme_dag_blank.html)()

Warning: The text argument of geom_dag() no longer accepts
logicals as of ggdag 0.3.0.
ℹ Set use_text = FALSE. To use a variable other than
node names, set text = variable_name
ℹ The deprecated feature was likely used in the ggdag
package.
Please report the issue at
https://github.com/r-causal/ggdag/issues.
Warning: The use_labels argument of geom_dag() must be a
logical as of ggdag 0.3.0.
ℹ Set use_labels = TRUE and label = label
ℹ The deprecated feature was likely used in the ggdag
package.
Please report the issue at
https://github.com/r-causal/ggdag/issues.

@malcolmbarrett
Copy link
Collaborator

Thanks for catching! Yes, this will naturally resolve with #244 but in the meantime I'll disable the warning

Incidentally, later in this chapter, I talk about what I mentioned on LinkedIn about being a bit more defensive in your adjustment strategy vs just the minimal adjustment set. So now you know my opinion 😛

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 a pull request may close this issue.

2 participants