similar to: ggplot adding points

Displaying 20 results from an estimated 10000 matches similar to: "ggplot adding points"

2008 Oct 13
1
ggplot faceting like lattice | variable
I would like to be able to do the xyplot in ggplot below. I read in the archive that Hadley was working on this for the next release, and I can not find the documentation (Aug. 23rd). River.Mile <- c(215 ,202, 198, 190, 185, 179, 148, 119, 61) Cu <- rnorm(9) Fe <- rnorm(9) Mg <- rnorm(9) Ti <- rnorm(9) Ir <- rnorm(9) r <- data.frame(River.Mile, Cu, Fe, Mg, Ti, Ir) z <-
2008 Jul 07
3
subset() multiple arguments
This is what I would like to do and it works just fine. Is there a way to shorten this code so I don't have to subset a subset of a subset? d<-subset(subset(subset(subset(x, River.Mile<=202), River.Mile>3), Lagrangian=="Yes"), EventType=="Regular") Stephen -- Let's not spend our time and resources thinking about things that are so little or so large that
2008 Jan 31
2
Box Plot With Groups being numbers
I would like to Summarize values that are repeated measures at a certain river mile with box plot i.e. The data matrix looks like this 123 124 125 #fiver mile 0.5 0.6 0.7 0.4 0.5 0.6 ... ... ... #values I would like to make a boxplot with the river mile naming the different box plot. How do you suppress the X123? Stephen -- Let's not
2008 Oct 23
1
Reversing xlim qplot
I would like to be able to reverse the xlim on qplot this is the code that I am using qplot(a[,"River.Mile"], a[,26] ,ylab=colnames(a)[26], xlab="RiverMile", xlim=rev(c(60, 216)))+geom_smooth()+scale_x_continuous(breaks=c(215,202,198,190,185,179,148,119,61),
2008 Feb 12
4
summary statistics
below is my data frame. I would like to compute summary statistics for mgl for each river mile (mean, median, mode). My apologies in advance- I would like to get something like the SAS print out of PROC Univariate. I have performed an ANOVA and a tukey LSD and I would just like the summary statistics. thanks stephen RM mgl 1 215 0.9285714 2 215 0.7352941 3 215 1.6455696 4 215
2008 Apr 29
1
merging multiple data frames with different numbers of rows
merge can only merge two objects at a time- I would like to merge more than two objects at a time. s.d <- structure(list(RiverMile = c(202L, 198L, 190L, 185L, 179L, 148L, 119L, 61L)), .Names = "RiverMile", row.names = c(NA, -8L), class = "data.frame") #s.d is all of the river miles that can occur in all of the data frames that I want to put together feb06 <-
2009 Oct 06
2
ggplot cumsum refined question (?)
OK, so maybe last night was a little too much at one throw, so I have reduced the data to two stations- one that has precipitation and one that does not. This is going to be in the context of a larger data set. I would like to be able to issue a ggplot command and have cum sum just act on the facets (factors) to apply this. library(chron) library(ggplot2) DF <- structure(list(date_time =
2008 Aug 26
1
processing subset lists and then plot(density())
d <- structure(list(Site = structure(c(8L, 12L, 7L, 6L, 11L, 5L, 10L, 4L, 3L, 2L, 1L, 9L, 8L, 12L, 7L, 6L, 11L, 5L, 10L, 4L, 3L, 2L, 1L, 9L, 8L, 12L, 7L, 6L, 11L, 5L, 10L, 4L, 3L, 2L, 1L, 9L, 8L, 12L, 7L, 6L, 11L, 5L, 10L, 4L, 3L, 2L, 1L, 9L, 8L, 12L, 7L, 6L, 11L, 5L, 10L, 4L, 3L, 2L, 1L, 9L, 8L, 12L, 7L, 6L, 11L, 5L, 10L, 4L, 3L, 2L, 1L, 9L, 8L, 12L, 7L, 6L, 11L, 5L, 10L, 4L, 3L, 2L, 1L, 9L,
2008 Oct 09
1
nls, lattice, and conversion over to ggplot
I am trying to figure out how to use ggplot2. I would like to do the below with ggplot, but I can not figure out how. The data provided is a subset of a much larger data set, but these data are the data necessary to make the plot. I think I would rather have the colors become symbols, and I do know how to do that in lattice, but here is a quick and dirty version. thanks r
2009 Dec 15
1
for loop for automatic pdf generation
I know this is not reproducible, but I don't want to clog up mail boxes with the data frame. I would be happy to send this off list. I am sure that I am missing something simple. The plotting works if I just paste the call to qplot into R and replace the [i] with a number. Thanks for all of your help in advance. #loop to spit out PDFs list.names <-
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
2010 May 18
2
Function that is giving me a headache- any help appreciated (automatic read )
note: whole function is below- I am sure I am doing something silly. when I use it like USGS(input="precipitation") it is choking on the precip.1 <- subset(DF, precipitation!="NA") b <- ddply(precip.1$precipitation, .(precip.1$gauge_name), cumsum) DF.precip <- precip.1 DF.precip$precipitation <- b$.data part, but runs fine outside of the function: days=7
2008 Oct 19
1
Date classes in ggplot2
updn.gg <- (structure(list(date = structure(c(11808, 11869, 11961, 11992, 12084, 12173, 12265, 12418, 12600, 12631, 12753, 12996, 13057, 13149), class = "Date"), unrestored = c(1.13789418691602, 0.704948049842955, 0.276777348238899, 0.417586861554189, 0.504870337754768, 0.673201771716216, 0.560704221510771, 0.835737007551542, 1.10773858390693, 0.197070828834836, 0.942350681588179,
2008 Oct 09
1
Biplot connecting consecutive dates (ggplot?)
I would like to connect the dots based on when they occur in time. Is there an easy way to do this? thanks f <- (structure(list(date = structure(c(1L, 2L, 3L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 4L, 5L, 6L, 7L, 8L, 9L, 2L, 3L, 10L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 4L, 5L, 6L, 7L, 9L ), .Label = c("1/1/03", "1/1/04", "1/1/06", "10/1/02",
2009 Jan 07
1
Replace Function (How to replace numbers in a data frame with a specific number)
taxa <- (structure(list(Date = structure(c(4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L), .Label = c("2006/04", "2006/05", "2006/07", "2006/10", "2006/12", "2007/02", "2007/04", "2007/06", "2007/08", "2007/10", "2007/12", "2008/01"), class =
2008 Mar 11
1
stacked graphs
I would like to reproduce a figure found in HBN Hynes "The Ecology of Running Waters" on page 79 reprint first edition copyright 2001. This is a graph with graphs of insect abundance through time lined up in 3d as you proceed down river. any help is appreciated Stephen -- Let's not spend our time and resources thinking about things that are so little or so large that all they
2008 Oct 22
1
plotting matrix
a <- c(1:26) b <- rnorm(25) e <- rnorm(25) f <- rnorm(25) g <- data.frame(b,e, a,f) I would like to plot a agianst all possibilities and then shoot it out to a pdf one graph per page. I think it would be okay to have this as a lattice plot or a ggplot with many graphs per page. I can figure all of that out I think, but I need something like r <- as.matrix(g) plot(.~a, data=r)
2008 May 01
4
Making a map in R?
Does anyone know of a package to make a map from GIS data, and/or would it be easier in one of the free GIS programs. I would like to make a map of the savannah river area with our sampling locations. thanks stephen -- Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are
2008 Sep 24
2
lattice xyplot symbols instead of colors and legend matching plot symbols or colors
I would like to use the data below where the plots are close to what I want. Instead of color I would like to use different symbols, and have the symbols in the legend match the graphs. I am also going to add a regression line to these I know about the type="r" (which is fine for these particular graphs) argument, but it fits the subsets instead of the entire data set-- should I use a
2012 Nov 16
2
source file on startup question - why does an old version of a function show up? ggplot or R?
All, 1. I will try and make this clear and concise. Please let me know any information that would be helpful in figuring out this problem (I don't know the relevant information to post). I am on linux- see below for session information. 2. Problem: working directory: home an old version of a function is sourced into the R session and doesn't work working directory: Desktop the