Displaying 15 results from an estimated 15 matches for "orderby".
Did you mean:
order_by
2009 Jul 02
7
Params Merge and URL sorting/pagination
...m search
1-form for search by date
When searching for a team for instance, the url returned will be:
/rushing_offenses?search=Florida
When searching by date, the url returned will be:
/rushing_offenses?compiled_on=2009-07-02
Pagination has a show all button:
/rushing_offenses?numteams=120&orderby=rank&sortby=asc
Pagination has a show simple button:
/rushing_offenses?orderby=rank&sortby=asc
If I click on each page number within will paginate the URL changes to:
/rushing_offenses?compiled_on=2009-07-02&orderby=rank&page=2&sortby=asc
My table helper functions for sorti...
2006 Sep 10
5
why isn't :order working in acts_as_list
Ok, I''m sure this has to be something stupid that I''m doing (or not
doing), but I can''t seem to get things to order by the specified column.
class List < ActiveRecord::Base
has_many :list_items, :order => "orderby"
The error I get back when trying to save the link is:
Unknown column ''position'' in ''order clause'': SELECT * FROM list_items
WHERE (list_id = 9) ORDER BY position DESC LIMIT 1
So it looks like its just defaulting to ''position'', and...
2010 Mar 10
2
ordering columns in a data frame
...06-07-01
682 CAO0070694 2007-09-13
685 CAO0070694 2006-08-22
695 CAO0072477 2003-06-04
696 CAO0072477 2004-07-05
718 CAO0073505 1998-09-15
720 CAO0073505 1989-09-18
725 CAO0073505 2000-11-22
727 CAO0073505 1991-08-23
I have managed to order it by PROCHI number using orderBy(PROCHI, data=dd)
what I need to do is order by PROCHI then by date of admission so that date
of admission is ascending by PROCHI ascending.
PROCHI date_admission
2 CAO0000713 1999-10-25
4 CAO0000713 1999-12-11
21 CAO0001743 1987-09-17
25 CAO0001743 1989-05-04...
2009 Jun 09
4
how to substitute missing values (NAs) by the group means
...e the first record of traits "NA" by the
mean of "BSPy01-10".
I have ever tried to solve this problem by using doBy package. But, I
failed. I ask for the right solutions by using doBy package or not.
The commands used and the output I got are as followed:
library(doBy)
df<-orderBy(~group,data=df) # succeeded
f1<-function(x){m<-mean(x, na.ram=TRUE); x[is.na(x)]<-m; x} # succeeded
datatraits<-lapplyBy(traits~group,data=df, FUN=f1(traits)) # failed
errors: mean(x, na.ram = TRUE), can not find 'traits'.
Thanks in advance.
Sincerely,
Mao J-F
[[alternati...
2011 Jun 24
0
lag and diff with transformBy
...ery useful doBy package, and
specifically, the transformBy() function?with the lag() and diff()
functions. ?It is often useful to lag or difference data within a
panel, i.e., within a by-group. ?Is the following code a safe use of
transformBy? Is there an alternative?
First, does the initial "orderBy" statement guarantee that the Time
order will be preserved in the "transformBy" statement?
Second, is there an alternative to explicitly padding the differenced
series with NA's? ?I received an error without c(NA,...) but maybe
there is a better way.
Third, the lag() function ge...
2009 Jun 09
1
how to use "lapplyBy" function of "doBy" package
...f "BSPy01-10" in the dummy dataframe.
I have ever tried to solve this problem by using doBy package. But, I
failed. I ask for the advice on how to use "lapplyBy" function of "doBy"
package.
The commands used and the output I got are as followed:
library(doBy)
df<-orderBy(~group,data=df) # succeeded
f1<-function(x){m<-mean(x, na.ram=TRUE); x[is.na(x)]<-m; x} # succeeded
datatraits<-lapplyBy(traits~group,data=df, FUN=f1(traits)) # failed
errors: mean(x, na.ram = TRUE), can not find 'traits'.
dummy dataframe:
> df
group traits
1 BSPy0...
2008 Feb 08
1
reshape question
...2 2 4
using the "reshape" command. But when I try reshaping I don't get the
desired structure:
> DF.L <- reshape(DF, varying = 2:5, idvar="sub", v.names = c("x1",
"x2"), times=c(1,2), direction="long")
> library(doBy)
> orderBy(~sub, data=DF.L)
sub time x1 x2
1.1 1 1 1 2
1.2 1 2 3 4
2.1 2 1 1 2
2.2 2 2 3 4
3.1 3 1 1 2
3.2 3 2 3 4
4.1 4 1 1 2
4.2 4 2 3 4
5.1 5 1 1 2
5.2 5 2 3 4
I can get the desired result by rearranging the original dataframe, lik...
2009 Mar 20
4
how to make aggregation in R ?
...;b1", "b2",
"b2", "b2", "c1", "c2", "c2", "c2", "c3", "d1", "d2", "d3", "d4", "d4"),
n1 = 1:20,
n2 = 21:40 )
testDF <- orderBy( ~ v1+v2, data = testDF)
rownames(testDF) <- NULL
> testDF
v1 v2 n1 n2
1 a a1 1 21
2 a a1 2 22
3 a a1 3 23
4 a a2 4 24
5 a a3 5 25
6 b b1 6 26
7 b b1 7 27
8 b b2 8 28
9 b b2 9 29
10 b b2 10 30
11 c c1 11 31
12 c c2 12 32
13 c c2 13 33
14 c c2 14 34
15 c c3...
2006 Oct 31
2
plotting multiple groups (newbie Q)
Hi Folks,
After loading a data set, I run the following:
> kSum <- orderBy(~group,(summaryBy(DP_Level~F2
+group,data=kdata,FUN=c(mean,sd),na.rm=T)))
kSum looks like this:
> kSum
F2 group DP_Level.mean DP_Level.sd
1 1.0 N -1.55186475 11.022245
4 2.0 N -2.48013300 10.624583
7 3.0 N -12.47671250 11.104792
10 4.0 N -13.72430950...
2008 Jun 21
1
passing arguments to a function problem
Dear R-users,
is there some way how to pass various colnames to the following code for
sorting data.frames?
mydf.ordered<-with(mydf, mydf[order(colname1,colname2, colnameX, decreasing
= TRUE), ])
I was trying something like
Afunction<-function (mydf,colnames,decreasing=T){
mydf.ordered<-with(mydf, mydf[order(colnames, decreasing = decreasing),
])
}
but it didnt work
please
2008 Jul 10
3
Sorting a matrix
Hi,
I want to sort a matrix by a specific variable without changing the
row binding between variables.
Ex.
Name Sex Age
Fred M 24
John M 18
Mary F 21
ordered by Age
Name Sex Age
John M 18
Mary F 21
Fred M 24
Thanks
Angelo
2012 Jan 19
8
sumarizar
*Hola!!! resulta que tengo unos datos de divisas ordenados por fechas
(días) los que he convertido a formato tipo YYYY-MM-DD donde DD siempre es
01:*
*
*
*
EUR.resto$date<-as.Date(EUR.resto$date)
EUR.resto$mo <- substr(EUR.resto$date,6,7)
EUR.resto$yr <- substr(EUR.resto$date, 1,4)
2011 Sep 21
0
Resumen de R-help-es, Vol 31, Envío 12 Mann-Whitney U Test
...project.org>
> Subject: Re: [R-es] Ordenar vectores correlativos
> Message-ID:
> <BB3B87345736EE45843CC0ADF9EEEB0D2B0D985212@hermes2.imim.es>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hola Eva,
> Otra función útil para ordenar datos es la función orderBy del paquete doBy.
>
> Saludos,
>
> Klaus.
> ________________________________________
> Von: r-help-es-bounces@r-project.org [r-help-es-bounces@r-project.org] im Auftrag von Eva Prieto Castro [evapcastro@yahoo.es]
> Gesendet: Dienstag, 20. September 2011 12:57
> An: r-help-...
2003 Dec 04
31
Shorewall Documentation Updates, Request for Input
Hello,
I have the go ahead to fix documentation. For starters I will clean all
extraneous crap from the markup. Then fix any errors and typos.
If anyone sees any gramatical errors or typos or needed clarifications or
expansions or whatever, please post them here.
Or additional FAQ entries, etc, all will be considered.
I hope to keep most of this conversation on the shorewall-devel list.
Any
2009 Jun 01
1
installing sn package
...r-help@r-project.org, Paul Geeleher <paulgeeleher@gmail.com>
Message-ID:
<5c62e0070905270936s41d29926g9cb5185bc5ecc799@mail.gmail.com>
Content-Type: text/plain
See also this tip on the R wiki:
http://wiki.r-project.org/rwiki/doku.php?id=tips:data-frames:sort
Also available as the orderBy function in the doBy package.
Kevin Wright
On Wed, May 27, 2009 at 11:19 AM, Linlin Yan <yanlinlin82@gmail.com> wrote:
> It's a very interesting problem. I just wrote a function for it:
>
> order.matrix <- function(m, columnsDecreasing = c('1'=FALSE), rows =
> 1...