Re: [R] reordering levels error

2010-08-30 Thread Felipe Carrillo
 Thanks Dennis: I always seem to have a hard time defining levels. That's exactly what I needed.    > >From: Dennis Murphy >To: Felipe Carrillo >Cc: r-h...@stat.math.ethz.ch >Sent: Mon, August 30, 2010 5:41:02 PM >Subject: Re: [R] reordering levels error > >H

Re: [R] reordering levels error

2010-08-30 Thread Dennis Murphy
Hi: I don't know if this is exactly what you wanted, but here goes. I made a few adjustments in the data frame before calling ggplot(): # library(ggplot2) # Reorient the order in which variables appear winter <- winter[, c(1, 7, 3, 6, 4, 5, 2)] # Get rid of second week 26 at the end winter2 <-

Re: [R] reordering levels error

2010-08-30 Thread David Winsemius
vels(w_melt$year) ) ) # Should reverse the order pdf("wtest.pdf") ggplot(w_melt,aes(week,value/1000,colour)) + geom_line(size=.75)+ theme_bw() + opts(title="Cumulative",axis.text.x = theme_text(angle=45,hjust=1)) + labs(y="Number of individuals X 1,000",x="

Re: [R] reordering levels error

2010-08-30 Thread Felipe Carrillo
umulative",axis.text.x = theme_text(angle=45,hjust=1)) +  labs(y="Number of individuals X 1,000",x="week") dev.off() Felipe D. Carrillo Supervisory Fishery Biologist Department of the Interior US Fish & Wildlife Service California, USA - Original Message >

Re: [R] reordering levels error

2010-08-30 Thread David Winsemius
On Aug 30, 2010, at 5:25 PM, Felipe Carrillo wrote: Please consider the following dataset: I want to reorder the levels by year but get the following error: Error in tapply(v, x, FUN, ...) : arguments must have same length I suspect that I need to add the levels before I melt the dataset but

[R] reordering levels error

2010-08-30 Thread Felipe Carrillo
Please consider the following dataset: I want to reorder the levels by year but get the following error: Error in tapply(v, x, FUN, ...) : arguments must have same length   I suspect that I need to add the levels before I melt the dataset  but either way I have only use 'reorder' once before and c