similar to: Question about ggplot2

Displaying 20 results from an estimated 5000 matches similar to: "Question about ggplot2"

2011 Feb 13
1
Changes titles in ggplot2 plot
Dear Colleagues, In the following simple ggplot2 code: -------------------------------- m <- ggplot(d.fig, aes(time, prob)) m + stat_summary(fun.data = "median_hilow", conf.int = .95, geom = "smooth") + facet_wrap(~ Cohort, nrow=1) + coord_cartesian(ylim = c(0, .03)) -------------------------------- Is there a way to replace the y-axis label from "prob" to
2008 May 12
1
Converting qqplot2 qplot() to grammar?
Hello all, I've been using the following qplot command: qplot(pixX,pixY, data=som, geom="tile", fill=rgb) + scale_fill_identity() + opts(aspect.ratio = .75) + facet_grid(unitX ~ unitY) Now I would like to convert it into the explicit ggplot grammar, so I can remove the extras: axes, labels, background, borders, facet labels, and extra white-space around the plot. (If anyone has
2011 May 27
2
help with barplot
Hi, I'm really struggling with barplot I have a data.frame with 3 columns. The first column represents an "incident" type The second column represents a "month" The third column represents a "time" Code for a sample data.frame incidents <- rep(c('a','b','d','e'), each =25) months <- rep(c(1,2), each =10) times
2013 Oct 12
2
Order of factors with facets in ggplot2
Hello, I'd like to produce a ggplot where the order of factors within facets is based on the average of another variable. Here's a reproducible example. My problem is that the factors are ordered similarly in both facets. I would like to have, within each facet of `f1', boxplots for 'x' within each factor `f2', where the boxplots are ordered based on the average of x
2013 Feb 15
1
Why no line? (ex. from Andy Filed book)
The following script is written by the author of a book on R--Andy Field: You can also download the small datafile, hiccups.dat, from this address: http://www.sagepub.com/dsur/study/articles.htm The script: hiccupsData <- read.delim("Hiccups.dat", header = TRUE) hiccups<-stack(hiccupsData) names(hiccups)<-c("Hiccups","Intervention")
2009 Sep 14
1
ggplot, ribbon not showing up properly
Hi, I'm trying to plot a longitudinal data set, using ggplot and adding some summary info (eg. mean, 1 sd bounds) using geom=ribbon. The summary info is based on a subset of the original data (eg. less an outlier). But I'm having trouble getting the ribbons to show up correctly. It's probably something obvious that I'm missing as a novice at ggplot2, and any help is much
2011 Jan 14
2
bug in qplot (library ggplot2)
Hello, this following code give a nice png: /library(ggplot2) i <- 1 png(file=paste('test ',i,'.png',sep='')) qplot(carat, data=diamonds, fill=color,geom='histogram')+scale_y_continuous(i) dev.off() / I would like to get more files, but the following code doesn't make any file: /library(ggplot2) for (i in 1:2) { png(file=paste('test
2011 Jan 24
1
ggplot2 - ribbon
Dear List, I am having trouble setting the transparency of a ribbon in ggplot2 and was wondering if anybody had any suggestions so far i have a plot exactly as i want it and i want to add a ribbon connecting the ymax and ymin, whci i do with the following command m10 + stat_summary(geom="ribbon", fun.ymin="min", fun.ymax="max") However the ribbon is a dark grey
2007 Dec 11
2
ggplot - Setting the y-scale in a bar plot
Dear All (probably Hadley), I am now trying to customise some plots using a bar geom. I do not want to use the default binning statistic, but rather calculate the bar heigths separately. I do manage this, but for comparison purposes I would like to have a set of plots all with the same y-axis height. But I do not seem to find out how to fix the scale of the y-axis in this case. Any tips?
2009 Jan 11
2
connecting boxplots
Hii, I created some boxplots with this commands: x <-read.table(file="test.txt") x$group <- rep(1:8, each=5) boxplot(V3~gruppe, data=x) Now, I will connect the boxplots to each other to the min, max and median values. Can anybody help me how to do it ? greetings, J -- View this message in context: http://www.nabble.com/connecting-boxplots-tp21405459p21405459.html Sent from
2010 Dec 29
2
RGtk2 compilation problem
Dear All, I am trying to compile&install the package "RGtk2" on my Ubuntu 10.04 box. I did not have problem with earlier versions, but with the new version, I got the following error message : ------------------------------------------------------------------------------------------------- * installing *source* package ?RGtk2? ... checking for pkg-config... /usr/bin/pkg-config
2010 Dec 29
2
RGtk2 compilation problem
Dear All, I am trying to compile&install the package "RGtk2" on my Ubuntu 10.04 box. I did not have problem with earlier versions, but with the new version, I got the following error message : ------------------------------------------------------------------------------------------------- * installing *source* package ?RGtk2? ... checking for pkg-config... /usr/bin/pkg-config
2008 Feb 18
2
Hazard model with long-term survivor (cure model)
Dear All, Are there R packages that can estimate survival model with long-term survivors? This is sometimes known as "cure" model or "split-population" model. Thanks. Shige [[alternative HTML version deleted]]
2017 Jun 07
1
Errors running spdplyr example
Dear All, When I tried to run the following code (taken from the *spdplyr* package vignettes): library(spdplyr) library(maptools) data(wrld_simpl) worldcorner <- wrld_simpl %>% mutate(lon = coordinates(wrld_simpl)[,1], lat = coordinates(wrld_simpl)[,2]) %>% filter(lat < -20, lon > 60) %>% dplyr::select(NAME) I got the following error messages: Error in (function (cl,
2016 Apr 09
1
Run script R
hi all ,? i have an problem in script R . But when I execute the script R I face this error . can you help me please ???error:----------------------------------------- Error in FUN(X[[i]], ...) :?? Theme element 'text' has NULL property: margin, debugIn addition: Warning messages:1: Removed 361 rows containing non-finite values (stat_smooth).?2: Removed 361 rows containing missing values
2012 Jul 03
2
ggplot2: legend
Dear all, I produced the following graph with ggplot which is almost fine, yet I don't like that the legend for "Means" and "Observations" includes a line, though no line is used in the plot for those two (the line for "Overall Mean" on the other hand is wanted): library(ggplot2) ddf <- data.frame(x = factor(rep(LETTERS[1:2], 5)), y = rnorm(10)) p <-
2009 Jul 26
3
Sweave, cacheSweave, and data frame
Dear All, I have been using Sweave (mainly via the Sweave.sh script) and really like it. I am working a paper (using Sweave, of course) which includes several time-consuming computations, and it gets tedious to re-compile the whoel thing every time I made changes. Then I discover the "cacheSweave" package, which seems the right solution to my problem. I only have on problem. Here is
2005 Aug 30
1
How to set starting values for lmer?
Dear All, Can anyone give me some hints about how to set starting values for a lmer model? For complicated models like this, good starting values can help the numerical computation and make the model converge faster. Thanks! Shige [[alternative HTML version deleted]]
2009 Apr 25
2
Changing gird marks in ggplot2
Hi, When I zoom into a graph created in ggplot2 with the coord_cartesian(ylim=c(0,5)) option, I have no values labelled on my y-axis. For this graph ggplot2 only puts labels the y-axis at intervals of 10 (i.e. 0, 10, 20, ...). However, the major portion of the graph I am interested in is located between the values of 0 and 5 on the y-axis (thus why I am zoooming). How can I coerce ggplot2 into
2008 Feb 18
2
Custom Plot - means, SD & 5th-95th% (Plotmeans or Boxplot)?
Any help with this problem would be greatly appreciated: I need to produce a custom plot i haven't come across in R. Basically, I want to show means, 1st standard deviation and 5th and 95th percentiles visually, using something resembling a boxplot. Is it possible to completely customize a boxplot so that it shows means as the bar (instead of, not as well as medians), standard deviations at