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

Example 2 under 'line plots' in the 'Plot Means/Medians and Error Bars' section of sthda website is not reproducible #109

Closed
JesseRop opened this issue Sep 5, 2018 · 6 comments

Comments

@JesseRop
Copy link

JesseRop commented Sep 5, 2018

The code below does not generate standard_error bars around the mean of the variable grouped by color as shown in the example on the sthda webpage [http://www.sthda.com/english/articles/24-ggpubr-publication-ready-plots/79-plot-meansmedians-and-error-bars/]

ggline(ToothGrowth, x = "dose", y = "len", add = c("mean_se", "jitter"), color = "supp", palette = "jco")

@JesseRop JesseRop changed the title Example 2 under 'line plots' in the ' http://www.sthda.com/english/articles/24-ggpubr-publication-ready-plots/79-plot-meansmedians-and-error-bars/ ' not reproducible Example 2 under 'line plots' in the 'Plot Means/Medians and Error Bars' section of sthda website is not reproducible Sep 5, 2018
@kassambara
Copy link
Owner

This was a bug, fixed now, thanks! Please install the latest developmental version and try this:

library(ggpubr)
ggline(ToothGrowth, x = "dose", y = "len", 
       add = c("mean_se", "jitter"), 
       color = "supp", palette = "jco"
)

rplot

@Induriel
Copy link

Induriel commented Nov 8, 2018

Hi, it does still not work for me. Instead of showing the errorbars of each grouping, it shows the errorbar for the whole group. I used exactly the same code as you just mentioned and I get this:
rplot03
(also downloaded the newest dev-package, just to be sure)

Thanks a lot for your work, its a great package :-)

@kassambara
Copy link
Owner

It works for me, make sure you have the latest version. If it fails, please, provide the output of devtools::session_info()

@Induriel
Copy link

Induriel commented Nov 8, 2018

I checked that all the versions are up to date, still getting the same graph.
Because I'm using RStudio, I run the same code in the "normal" R-Console. Same thing :-(

Here is the code and Session info:

library(ggpubr)
Loading required package: ggplot2
Loading required package: magrittr
ggline(ToothGrowth, x = "dose", y = "len",
add = c("mean_se", "jitter"),
color = "supp", palette = "jco")
devtools::session_info()

Session info ---------------------------------------------------------------
setting value
version R version 3.5.1 (2018-07-02)
os Windows 8.1 x64
system x86_64, mingw32
ui Rgui
language (EN)
collate English_United Kingdom.1252
ctype English_United Kingdom.1252
tz Europe/London
date 2018-11-08

Packages -------------------------------------------------------------------
package * version date lib source
assertthat 0.2.0 2017-04-11 [1] CRAN (R 3.5.1)
backports 1.1.2 2017-12-13 [1] CRAN (R 3.5.0)
base64enc 0.1-3 2015-07-28 [1] CRAN (R 3.5.0)
bindr 0.1.1 2018-03-13 [1] CRAN (R 3.5.1)
bindrcpp 0.2.2 2018-03-29 [1] CRAN (R 3.5.1)
callr 3.0.0 2018-08-24 [1] CRAN (R 3.5.1)
cli 1.0.1 2018-09-25 [1] CRAN (R 3.5.1)
colorspace 1.3-2 2016-12-14 [1] CRAN (R 3.5.1)
crayon 1.3.4 2017-09-16 [1] CRAN (R 3.5.1)
desc 1.2.0 2018-05-01 [1] CRAN (R 3.5.1)
devtools 2.0.1 2018-10-26 [1] CRAN (R 3.5.1)
digest 0.6.18 2018-10-10 [1] CRAN (R 3.5.1)
dplyr 0.7.7 2018-10-16 [1] CRAN (R 3.5.1)
fs 1.2.6 2018-08-23 [1] CRAN (R 3.5.1)
ggplot2 * 3.1.0 2018-10-25 [1] CRAN (R 3.5.1)
ggpubr * 0.1.8 2018-08-30 [1] CRAN (R 3.5.1)
ggsci 2.9 2018-05-14 [1] CRAN (R 3.5.1)
glue 1.3.0 2018-07-17 [1] CRAN (R 3.5.1)
gtable 0.2.0 2016-02-26 [1] CRAN (R 3.5.1)
labeling 0.3 2014-08-23 [1] CRAN (R 3.5.0)
lazyeval 0.2.1 2017-10-29 [1] CRAN (R 3.5.1)
magrittr * 1.5 2014-11-22 [1] CRAN (R 3.5.1)
memoise 1.1.0 2017-04-21 [1] CRAN (R 3.5.1)
munsell 0.5.0 2018-06-12 [1] CRAN (R 3.5.1)
pillar 1.3.0 2018-07-14 [1] CRAN (R 3.5.1)
pkgbuild 1.0.2 2018-10-16 [1] CRAN (R 3.5.1)
pkgconfig 2.0.2 2018-08-16 [1] CRAN (R 3.5.1)
pkgload 1.0.2 2018-10-29 [1] CRAN (R 3.5.1)
plyr 1.8.4 2016-06-08 [1] CRAN (R 3.5.1)
prettyunits 1.0.2 2015-07-13 [1] CRAN (R 3.5.1)
processx 3.2.0 2018-08-16 [1] CRAN (R 3.5.1)
ps 1.2.1 2018-11-06 [1] CRAN (R 3.5.1)
purrr 0.2.5 2018-05-29 [1] CRAN (R 3.5.1)
R6 2.3.0 2018-10-04 [1] CRAN (R 3.5.1)
Rcpp 0.12.19 2018-10-01 [1] CRAN (R 3.5.1)
remotes 2.0.2 2018-10-30 [1] CRAN (R 3.5.1)
rlang 0.3.0.1 2018-10-25 [1] CRAN (R 3.5.1)
rprojroot 1.3-2 2018-01-03 [1] CRAN (R 3.5.1)
scales 1.0.0 2018-08-09 [1] CRAN (R 3.5.1)
sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 3.5.1)
tibble 1.4.2 2018-01-22 [1] CRAN (R 3.5.1)
tidyselect 0.2.5 2018-10-11 [1] CRAN (R 3.5.1)
usethis 1.4.0 2018-08-14 [1] CRAN (R 3.5.1)
withr 2.1.2 2018-03-15 [1] CRAN (R 3.5.1)

[1] C:/ResearchSoftware/R/R-3.5.1/library

@kassambara
Copy link
Owner

I can see that you have the latest CRAN release of ggpubr.

Kindly install the latest developmental version of ggpubr as follow:

devtools::install_github("kassambara/ggpubr")

It should work after the installation

@Induriel
Copy link

Induriel commented Nov 8, 2018

You're a STAR! Thank you so much, it works perfectly now 🥇

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

No branches or pull requests

3 participants