similar to: ggplot faceting like lattice | variable

Displaying 20 results from an estimated 10000 matches similar to: "ggplot faceting like lattice | variable"

2008 Oct 10
2
ggplot adding points
I would like to do the following in ggplot: what am I missing? River.Mile <-c(202, 198, 190, 185, 179, 148, 119, 61) TSS <- c(1:8) DOC <- seq(2, by= 0.6, length.out=8) z <- data.frame(River.Mile, TSS, DOC) xyplot(TSS+DOC~River.Mile, data=z, auto.key=TRUE) thanks -- Stephen Sefick Research Scientist Southeastern Natural Sciences Academy Let's not spend our time and resources
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 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 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 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 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
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 <-
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",
2008 Sep 19
1
ggplot2 and lattice
I am in the process of learning lattice graphics and have looked at ggplot2 a little. I would like to know if there is a "tutorial" that shows how to convert lattice code into ggplot code and vise versa. I am finally discovering the power of these two packages and would like suggestions to lessen my learning curve. I could not find a straight foward answer on the internet (I may have
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 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
2008 Oct 19
1
zoo in ggplot2
library(zoo) d<-(structure(c(1.39981554315924, 0.89196314359498, 0.407816250252697, 0.823496839063978, 1.14429021220358, 1.23971035967413, 0.960868900583432, 0.927685306209829, 1.22072345292821, 0.249842897450642, 1.00879641624694, 0.925372139878243, 0.317259909172362, 0.382677149697482), index = structure(c(11808, 11869, 11961, 11992, 12084, 12173, 12265, 12418, 12600, 12631, 12753, 12996,
2008 May 08
0
RSEIS could you help
I have dissolved oxygen traces that are continuous (fifteen minutes) for two years (save for a couple of days, weeks, or minutes there depending on the perogative of the river). These traces are spaced out by river mile. I have figured out how to prepare data as to the sunspot example, but I can not figure out how to get multiple traces into the prepSEIS function and this is the warning that I
2008 Oct 17
1
ggplot2 scale relation free
I don't know if there is a way to use the scale relation free argument in ggplot2 like in lattice. I have a feeling that there is not, but I would like to make a plea for this feature. It would be nice to be able to plot Total Inorganic Nitrogen Total Phosphorus and the ratio of the two- the numbers on the axis are not related, but the previous two are surely related to the last (this ratio
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 Sep 20
1
fitting a hyperbole
I have got a data set that is Gross Primary Productivity ~ Total Suspended Solids it is a hyperbola just like: plot(1/c(1:1000)) how do I model this relationship so that I can get all of the neat things that lm gives residuals etc. etc. so that I can see if my eyeball model stands up. Thanks for any help, pointers, or good things to read. -- Stephen Sefick Research Scientist Southeastern
2008 Aug 28
1
abline of an lm fit not correct
mac osx 10.5.4 R 2.7.1 I have fit a model d<-lm(y~x) with an R^2 of 0.963 but when I issue the command abline(d) the line is below where it ought to be. Looks like the right slope, but not the right intercept. thanks -- Stephen Sefick Research Scientist Southeastern Natural Sciences Academy Let's not spend our time and resources thinking about things that are so little or so large
2008 Oct 29
1
Macro stuff to work on up through august 2007
Title says it all remember cast() with sum as the aggregation function -- Stephen Sefick Research Scientist Southeastern Natural Sciences Academy 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 mammals, and have not exhausted the annoying little problems of being
2008 Nov 09
1
maptools sunrise sunset function
##This is a function that I am trying to write to calculate sunrise and sunset and works "mostly", but returns nonsensical values. What am I #missing? Thanks in advance. ###remember to include maptools as dependence### library(maptools) sunrise.set <- function(lat, long, date, timezone="UTC", num.days=1){ #this needs to be long lat# lat.long <- matrix(c(long, lat),