Re: [R] Maintaining specific order when using aggregate or change order on axis

2012-09-11 Thread William Dunlap
l Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf > Of Tinus Sonnekus > Sent: Tuesday, September 11, 2012 10:52 AM > To: r-help@r-project.org > Subject: [R] Maintaining specific order when using aggregate or change orde

Re: [R] Maintaining specific order when using aggregate or change order on axis

2012-09-11 Thread arun
44000 0.546000 A.K. From: Tinus Sonnekus To: arun Sent: Tuesday, September 11, 2012 2:36 PM Subject: Re: [R] Maintaining specific order when using aggregate or change order on axis Hi, Thanks for the reply. I know the order is abit confusing, but here is a

Re: [R] Maintaining specific order when using aggregate or change order on axis

2012-09-11 Thread arun
aining specific order when using aggregate or change order on axis Hi All, I'm using the following code to produce some stacked bar graphs. *setwd("C:\\Users\\Tinus\\Documents\\NMMU\\R\\Seamounts")* *SChla <- read.csv("SM_Chla_data.csv")* * * *#Extract mean values from dat

Re: [R] Maintaining specific order when using aggregate or change order on axis

2012-09-11 Thread Rui Barradas
Hello, If you order your original (wanted) order and then order that result you get what you want. The example is with fake data but the idea is in the last two lines. # Make up some data set.seed(9210) n <- 1e2 depth <- c('surface', 'shallow', 'deep', 'fmax', 'below') dat <- data.frame(Depth

[R] Maintaining specific order when using aggregate or change order on axis

2012-09-11 Thread Tinus Sonnekus
Hi All, I'm using the following code to produce some stacked bar graphs. *setwd("C:\\Users\\Tinus\\Documents\\NMMU\\R\\Seamounts")* *SChla <- read.csv("SM_Chla_data.csv")* * * *#Extract mean values from data file* * * *Coral <- SChla[185:223,] #Reduce SChla to Coral only* *coral <- with(Coral , a