I just tested your code on my debian install with no problems. RStudio server logs messages to /var/log/messages (on redhat). Does running:
$ cat /var/log/messages |grep rsession $ cat /var/log/messages |grep rserver in the shell give any clues? R version 3.2.5 (2016-04-14) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Debian GNU/Linux 8 (jessie) locale: [1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C LC_TIME=en_CA.UTF-8 LC_COLLATE=en_CA.UTF-8 [5] LC_MONETARY=en_CA.UTF-8 LC_MESSAGES=en_CA.UTF-8 LC_PAPER=en_CA.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] ggplot2_2.1.0 loaded via a namespace (and not attached): [1] Rcpp_0.12.4 splines_3.2.5 MASS_7.3-45 munsell_0.4.3 colorspace_1.2-6 xtable_1.8-2 [7] lattice_0.20-33 multcomp_1.4-4 minqa_1.2.4 plyr_1.8.3 tools_3.2.5 pbkrtest_0.4-6 [13] parallel_3.2.5 grid_3.2.5 nlme_3.1-126 gtable_0.2.0 TH.data_1.0-7 coda_0.18-1 [19] survival_2.38-3 lme4_1.1-11 Matrix_1.2-4 nloptr_1.0.4 codetools_0.2-14 labeling_0.3 [25] sandwich_2.3-4 estimability_1.1-1 lsmeans_2.23 scales_0.4.0 mvtnorm_1.0-5 zoo_1.7-12 On Wed, May 18, 2016 at 8:57 AM, <phi...@free.fr> wrote: > > > Here's a minimal example that displays a bar chart in RStudio 3.2.4 for > Windows, but not in RStudio Server 3.2.3 on RH Linux 7: > > ------------------------------------------------------------------- R Code > ------------------------------------------------------------------- > > library(ggplot2) > a <- c("ab", "bc", "cd") > b <- c("de", "fg", "hi") > ds <- data.frame(a,b) > g1 <- ggplot(data = ds, aes(x=a)) > g1 + geom_bar(stat="count", fill=rainbow(3), colour="black") + > xlab("Action & Description") + ylab("Count") + ggtitle("test") + > coord_flip() > > > ---------------------------------------------------------------------------------------------------------------------------------------------- > > ----------------------------------------------------------- sessionInfo on > Windows ---------------------------------------------------------- > > R version 3.2.4 Revised (2016-03-16 r70336) > Platform: x86_64-w64-mingw32/x64 (64-bit) > Running under: Windows 7 x64 (build 7601) Service Pack 1 > > locale: > [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United > States.1252 > [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C > [5] LC_TIME=English_United States.1252 > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] gridExtra_2.2.1 ggthemes_3.0.2 lubridate_1.5.0 RJDBC_0.2-5 > rJava_0.9-8 > [6] DBI_0.3.1 ggplot2_2.1.0 > > loaded via a namespace (and not attached): > [1] Rcpp_0.12.4 assertthat_0.1 grid_3.2.4 plyr_1.8.3 > [5] gtable_0.2.0 magrittr_1.5 scales_0.4.0 stringi_1.0-1 > [9] labeling_0.3 tools_3.2.4 stringr_1.0.0 munsell_0.4.3 > [13] rsconnect_0.4.1.11 colorspace_1.2-6 > > > > > -------------------------------------------------------------------------------------------------------------------------------------------- > > --------------------------------------------------------- sessionInfo on > RH Linux 7 ------------------------------------------------------- > > R version 3.2.3 (2015-12-10) > Platform: x86_64-redhat-linux-gnu (64-bit) > Running under: Red Hat Enterprise Linux > > locale: > [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C > LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 > LC_MONETARY=en_US.UTF-8 > [6] LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C > LC_ADDRESS=C LC_TELEPHONE=C > [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] gridExtra_2.2.1 ggthemes_3.0.3 ggplot2_2.1.0 lubridate_1.5.6 > RJDBC_0.2-5 rJava_0.9-8 DBI_0.4-1 > > loaded via a namespace (and not attached): > [1] Rcpp_0.12.5 assertthat_0.1 grid_3.2.3 plyr_1.8.3 > gtable_0.2.0 magrittr_1.5 scales_0.4.0 stringi_1.0-1 > [9] tools_3.2.3 stringr_1.0.0 munsell_0.4.3 colorspace_1.2-6 > > > ------------------------------------------------------------------------------------------------------------------------------------------ > > > > > > ----- Mail original ----- > De: "Jeff Newmiller" <jdnew...@dcn.davis.ca.us> > À: phi...@free.fr, r-help@r-project.org > Envoyé: Mercredi 18 Mai 2016 14:36:50 > Objet: Re: [R] ggplot2 not displaying graph in RH7 RStudio Server 3.2.3 > > Context is everything. Please follow the Posting Guide and provide a > minimal reproducible example. Also, if your scripts are literally the same > on the two platforms, you should provide the output of the sessionInfo() > function for each. > -- > Sent from my phone. Please excuse my brevity. > > > On May 18, 2016 12:32:47 AM PDT, phi...@free.fr wrote: > > > Hello, > > I have written an R script which displays a bar chart using the ggplot2 > library (please refer > to code excerpt at the bottom of this e-mail). > > Although the bar chart is displayed OK in the Windows version of RStudio > (v. 3.2.4), > nothing appears on Linux RH 7 in Rstudio Server 3.2.3. > > I have tried replacing the data frame in the RH-version of the script by > > > > > a <- c("ab", "bc", "cd") > b <- c(1, 2, 3) > ds <- data.frame(a,b) > g1 <- ggplot(data = ds, aes(x = a)) > > > > > > ... but to avail: ggplot doesn't plot anything. No error message are > displayed. > > Any help with this issue would be much appreciated. > > Many thanks. > > phiroc > > > ----------------------------- R Code Excerpt > > > > g1 <- ggplot(data = mergedD, aes(x=DESC_TYPE)) > g1 + geom_bar(stat="count", > fill=rainbow(numberOfDistinctActions), colour="black") + > xlab("Action & Description") + > ylab("Count") + > ggtitle(paste0( > "Number of Customer Actions in XXX from ", day0, "/", mon, > "/", year, " to ", day1, "/", mon, "/", year, > " in Paris & Hong Kong")) + > coord_flip() > > > > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.