ACCLAB / dabestr

Data Analysis with Bootstrap Estimation in R
https://acclab.github.io/dabestr
Apache License 2.0
214 stars 34 forks source link

Vector graphic export produces hundreds of x-axes #137

Open juhalainen opened 1 year ago

juhalainen commented 1 year ago

Thank you for a great package! I am currently in the process of switching to estimation statistics instead of ANOVA and pairwise comparisons.

I usually export plots as vector graphics (.pdf, .svg, .eps, et c.) and edit them in Affinity designer before publication. There is a strange bug when I export dabest-plots as vector graphics (I have tried .pdf and .svg): multiple groups containing hundreds of x-axes are produced. This means the vector files become very heavy for Affinity designer, and I have to delete all of these vectors manually.

data("ToothGrowth")
df <- ToothGrowth
df$dose = as.factor(df$dose)

est_df <- 
  df %>%
  dabest(dose, len, 
         idx = c("0.5","1", "2"),
         paired = FALSE
         )

est_df.mean_diff <- est_df %>% mean_diff()

estdfplot<-plot(est_df.mean_diff, 
     rawplot.type = "swarmplot")

estdfplot

ggsave(filename = "tooth.pdf")

Created on 2023-03-01 with reprex v2.0.2

When opening the vector graphics file in Affinity designer, it contains multiple x-axes:

Screenshot 2023-03-01 at 08 58 33

Each group contains hundreds of duplicate vectors:

Screenshot 2023-03-01 at 08 58 44

sunroofgod commented 11 months ago

Hi @juhalainen,

We've recently released a new version of dabestr, 
“Lapis” (v2023.9.12), which adds estimation graphics for four new data types: repeated measures, 2 × 2 designs, proportions, and easy meta-analyses.

dabestr version “Lapis” is a complete rebuild of the original dabestr and as such, unfortunately, v0.3.0 of dabestr and below are now deprecated and will no longer be receiving support.

We strongly recommend upgrading to the latest version (“Lapis”) as soon as possible. This will not only ensure access to the latest features but also expedite the resolution of any issues you may have encountered.

You can find the latest release here and the updated documentation for the package here.

For quick installation, you may refer to the following:

# Install it from CRAN
install.packages("dabestr")

# Or the development version from GitHub:
# install.packages("devtools")
devtools::install_github(repo = "ACCLAB/dabestr", ref = "dev")

If you face any challenges during the update process or have further questions, please don't hesitate to reach out.

We value your feedback and appreciate your continued support!