similar to: change order of plot panels in faceted ggplot/qplot

Displaying 20 results from an estimated 3000 matches similar to: "change order of plot panels in faceted ggplot/qplot"

2010 Sep 22
2
speeding up regressions using ddply
Hi, I have a data set that I'd like to run logistic regressions on, using ddply to speed up the computation of many models with different combinations of variables. I would like to run regressions on every unique two-variable combination in a portion of my data set, but I can't quite figure out how to do using ddply. The data set looks like this, with "status" as
2008 Jun 17
1
ggplot facet spacing, wrapping
I'm running into some problems with the spacing of some faceted ggplot plots. I have a number of time series faceted to be one above another, but the scale labels of the y axes all clobber each other at the bottom/top of each. for example, try: qplot(x, y, data = data.frame(x = 1:10, y = 1:10, size = 1:10), facets = size ~ ., size = size) + scale_x_continuous(breaks = 1:10) +
2010 Aug 21
2
t.tests on a data.frame using an apply-type function
I have a data.frame with ~250 observations (rows) in each of ~50 categories (columns). I would like to perform t.tests on subsets of observations within each column, with the subsets according to index vectors contained in other columns of the data.frame. My data.frame looks something like this: x<-data.frame(matrix(rnorm(200,mean=5,sd=.5),nrow=20)) colnames(x)<-c("site",
2008 Aug 22
2
Combining multiple datasets
Hi, I've tried to figure this out using Intro to R and help(), to no avail - I am new at this. I'm trying to write a script that will read multiple files from a directory and then merge them into a single new data frame. The original data are in a tree-ring specific format, and so I've first used a function (read.rwl) from the dplR package to read each file, translate each into a
2008 Mar 04
1
qplot (ggplot2) faceting histogram with missing values
Hi, I've run into a difficulty with qplot function (in the ggplot2 package). I can facet histograms even when the faceting variable contains missing values, but only so long as the faceting variable is not a factor. Example: y1 <- rnorm(10) x1 <- c(rep(1,5), rep(2,4), NA) x2 <- factor(c(rep(1,5), rep(2,4), NA)) library(ggplot2) qplot(y1, geom = "histogram", facets =
2011 Jun 07
2
ggplot2 and facet
I have a data frame (attached) that has interpolated EOT errors for each minute before flight landing. It also has the runway and an index for the flight: > > times[1:4,] time error runway flight 1 0 -0.02206235 04R 1 2 1 -0.07961631 04R 1 3 2 -0.13795380 04R 1 4 3 -0.20726073 04R 1 > > sapply(times, class) time error
2009 Jun 10
1
ggplot, qplot: alpha channel for colors corresponding to factor
Hi, I have a qplot like the one in the minimal example below, except I also have faceting like this: qplot(jitter(Goodall),jitter(Better.adapt),colour=Second.adapt,facets=~Pol,data=d1) and with the real data I get quite a lot of overplotting, so I would like to add an alpha channel. In addition, I would like to be able to control which colors are used for each value of Second.adapt (which
2011 Nov 08
2
nesting scale_manual caracteristics in ggplot
Hi there, I am having a little problem with combining three scale_manual commands in a facet plot. I am not able to combine the three different characteristics, instead ending up with three different descriptions next to the graph for the same geom. I would like to see two separate labels (not three); one describing lines 1-7 and the other 8-14. For each of the treatments (A-B) I want a
2009 Feb 11
2
Label bars in a faceted bar plot in ggplot2
Hi List, I am running R 2.8.0 on a Windows XP machine, running ggplot2 version 0.8.1 I want to label the bars in a faceted grid barplot. Reproducible R code is given below: #### reproducible facet barplot ##### library(ggplot2) # Dataset from which to create the barplot ml <- rep(1:10,2) vals <- rnorm(20,mean = 10, sd=1) type <- c(rep("MAPE",10),rep("AIC",10))
2009 Oct 06
1
ggplot2 applying a function based on facet
Look at the bottom of the message for my question #here is a little function that I wrote USGS <- function(input="discharge", days=7){ library(chron) library(gsubfn) #021973269 is the Waynesboro Gauge on the Savannah River Proper (SRS) #02102908 is the Flat Creek Gauge (ftbrfcms) #02133500 is the Drowning Creek (ftbrbmcm) #02341800 is the Upatoi Creek Near Columbus (ftbn) #02342500 is
2009 Mar 12
3
Unable to run smoother in qplot() or ggplot() - complains about knots
I get the following error when I run qplot() qplot(grade, read,data = hhm.long.m, geom = c("point", "smooth")) Error in smooth.construct.cr.smooth.spec(object, data, knots) : x has insufficient unique values to support 10 knots: reduce k. I am not sure how to tackle this problem. When I take a subsample (< 1000) than I am able to run that function but with my sample
2011 Mar 25
4
two plots in qplot
Hello I simply want to plot two variables against one 'year' variable in qplot. Is any way of doing this without reshaping data in long format and using facet function afterwards? Thank you Denis
2006 Oct 27
2
qplot of ggplot package how to plot different size according to the values and not to the weights?
I have the following Data structure $ step45 : Factor w/ 2 levels $ obserror : num 6.2 6.2 5.6 6.6 6.6 ... $ Mon : num 2.2 2.0 1.0 3.2 2.0 ... $ inc.comp : num 4 5 2 5 5 5 5 5 4 4 ... all I wanted to do is plotting Mon against obserror, the colors should be by step45 and the size of the symbol should be according to inc.comp so I did this:
2008 Oct 21
1
GGPLOT/QPLOT Boxplot with summary
I'd like to generate a boxplot that has BOTH the overall distribution of a continuous variable (say age), and then a boxplot for each level of a stratifying variable (e.g. site). Does anyone have prototype code for this? Thanks, -- View this message in context: http://www.nabble.com/GGPLOT-QPLOT-Boxplot-with-summary-tp20095591p20095591.html Sent from the R help mailing list archive at
2008 Sep 25
2
ggplot, qplot in loop
Dear List, yes, me again trying to work with qplot ;-) I would like to make several single plots within a loop, like this (simplified and so on...): trials <- c("A","B","C") mycolours <- ("wheat","darkolivegreen","lightgreen",
2008 Oct 14
1
ggplot2 plot with symbols and then add line
r <-(structure(list(TSS = c(2.8, 8.4, 11, 1.3, 4.2, 2, 3.4, 14, 8.2, 3.1, 1.4, 0.9, 0.5, 6.1, 9.2, 0.6, 1, 11, 2.4, 1.2, 1.3, 1.3, 0, 1.8, 8, 11, 11, 8.5, 8.5, 1.8, 13, 4.4, 1.4, 2.1, 0.5, 25, 25, 9.3, 6.1, 1.6, 1.5, 19, 19, 24, 9.6, 1.8, 1.4, 1), GPP = c(1.213695235, 3.817313822, 1.267930498, 10.45692825, 3.268295623, 3.505286001, 4.468225245, 0.915653726, 1.635617261, 3.726133898,
2011 Feb 10
1
Ggplot: free x-scales in a facet-grid
Hello, I have a ggplot that has the looks of the plot that I want, but it doesn't have the right layout. The data is an ordered melted dataframe: - ID - type (to use for a faced grid) - time - type - time - value (POSIXct) - pos (to use for a faced grid, this is an index to split the plot) The goal of the plot is to create a time line for each ID (different points of time). The ID's
2010 Sep 16
1
plotting time series using ggplots
Hi, I would like to plot a bunch of tree ring width data (time series) using ggplots, but I'm having trouble figuring out how to do it. My data is in a data.frame, with years as rownames and a distinct tree ring series in each column. So, something like this: rwl<-matrix(rnorm(800), nrow = 100) colnames(rwl) <- paste('V', 1:8, sep = '')
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
2010 Jun 30
2
ggplot qplot bar removing bars when truncating scale
I'm having problems with this example, it is posted with reproduceable code below, both with the normal 0-6 scale and the desired 3-6 scale (with bars removed). How can I get the graph to have the desired 3-6 scale without removing the bars. Thanks! #Data