NightingaleHealth / ggforestplot

An R package to create forestplots of measures of effects with their confidence intervals.
MIT License
57 stars 12 forks source link

Linear association example in the docs doesn't work #17

Open flashton2003 opened 5 months ago

flashton2003 commented 5 months ago

I'm working on a OS X M1 Mac, using R 4.1..0, and installed ggforestplot as instructed (devtools::[install_github](https://devtools.r-lib.org//reference/remote-reexports.html)("NightingaleHealth/ggforestplot"))

When I follow the test instructions, as below, I get this error Error in assertAndRetrieveTidyValue(x, mean): argument "x" is missing, with no default.

# install.packages("tidyverse")
library(tidyverse)
library(ggforestplot)

# Get subset of example, linear associations, data frame
df_linear <-
  ggforestplot::df_linear_associations %>%
  dplyr::arrange(name) %>%
  dplyr::filter(dplyr::row_number() <= 30)

# Forestplot
forestplot(
  df = df_linear,
  estimate = beta,
  logodds = FALSE,
  colour = trait,
  title = "Associations to metabolic traits",
  xlab = "1-SD increment in cardiometabolic trait
  per 1-SD increment in biomarker concentration"
)