Re: [R] Sorting a data frame by specifying a vector

2012-10-11 Thread Sarah Goslee
Spring 0.1927715 > #16 Spring 0.1927715 > > The process you describe does not get me there > > Any other recommendations? > > -Original Message- > From: arun [mailto:smartpink...@yahoo.com] > Sent: Thursday, October 11, 2012 10:33 AM > To: ROLL Josh F > Cc: R help >

Re: [R] Sorting a data frame by specifying a vector

2012-10-11 Thread arun
ly, the Obs column has only 4 values.  Do you want to get the means??? A.K. - Original Message - From: ROLL Josh F To: 'arun' Cc: R help Sent: Thursday, October 11, 2012 1:42 PM Subject: RE: [R] Sorting a data frame by specifying a vector Sorry if I wasn't clear but th

Re: [R] Sorting a data frame by specifying a vector

2012-10-11 Thread Bert Gunter
Winter 0.9318599 > #10 Winter 0.9318599 > #14 Winter 0.9318599 > #4 Spring 0.1927715 > #8 Spring 0.1927715 > #12 Spring 0.1927715 > #16 Spring 0.1927715 > > Any other thoughts? > > JR > > > -Original Message- > From: Bert Gunter [mailto:gunter.ber

Re: [R] Sorting a data frame by specifying a vector

2012-10-11 Thread ROLL Josh F
tober 11, 2012 10:33 AM To: ROLL Josh F Cc: R help Subject: Re: [R] Sorting a data frame by specifying a vector Hi, In your dataset, it seems like it is already ordered in the way you wanted to. df.. <- data.frame(Season=rep(c("Summer","Fall","Winter","Spring&

Re: [R] Sorting a data frame by specifying a vector

2012-10-11 Thread arun
927715 #5  Summer 0.2141001 #6  Winter 0.9318599 #7    Fall 0.6722337 #8  Spring 0.1927715 #9  Summer 0.2141001 #10 Winter 0.9318599 #11   Fall 0.6722337 #12 Spring 0.1927715 #13 Summer 0.2141001 #14 Winter 0.9318599 #15   Fall 0.6722337 #16 Spring 0.1927715 A.K. ----- Original Message - F

Re: [R] Sorting a data frame by specifying a vector

2012-10-11 Thread Bert Gunter
?order df[order(yourcolumn, ] -- Bert On Thu, Oct 11, 2012 at 10:08 AM, LCOG1 wrote: > Hello all, >I cannot seem to figure out this seemingly simple procedure. > > I want to sort a data frame by a specified character vector. > > So for : > > df.. <- data.frame(Season=rep(c("Summer","Fall","

[R] Sorting a data frame by specifying a vector

2012-10-11 Thread LCOG1
Hello all, I cannot seem to figure out this seemingly simple procedure. I want to sort a data frame by a specified character vector. So for : df.. <- data.frame(Season=rep(c("Summer","Fall","Winter","Spring"),4),Obs= runif(length(rep(c("Summer","Fall","Winter","Spring"),4 I want to so