search for: sorder

Displaying 3 results from an estimated 3 matches for "sorder".

Did you mean: order
2006 Jul 27
6
Any interest in "merge" and "by" implementations specifically for sorted data?
...in R but the problem is the data set this is being run on has 1,742,201 lines in it and takes up 196,868,713 bytes to store as character data. The sort key has easily has over 200,000 unique keys (if not twice that). My first R attempt was a simple # sort the data.frame gd and the sort key sorder <- order(MDPC) gd <- gd[sorder,] MDPC <- MDPC[sorder] attach(gd) # find the length and sum for each unique sort key XN <- by(MVE, MDPC, length) XSUM <- by(MVE, MDPC, sum) GRPS <- levels(as.factor(MDPC)) Well the ordering and sorting was reasonably fast but the first "by&qu...
2011 Jan 21
2
ordering a vector
Hi, is there a R function that order a matrix according to some criteria based on the rows(or cols) of that matrix? For example, let's say that my matrix S is composed by n rows S_1, S_2,.., S_n and that I compute some real value g_i=g(S_i) for each row. Then I want to order this set of g_i (from smaller to bigger) and order the correspondent row to the new position. Is it possible (apart
2011 Jan 22
0
how to call BayesX in R to see the graph
...m> Cc: r-help@r-project.org Subject: Re: [R] ordering a vector Message-ID: <AANLkTikifs+5YxOpYeoajMKKU9SrwP8Pv=TtgedkHCgn@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 I think you want the following, assuming you defined your function g(): gValues = apply(S, 1, g); Sordered = S[order(gValues), ] Peter On Fri, Jan 21, 2011 at 11:38 AM, Francesco Petrogalli <francesco.petrogalli@gmail.com> wrote: > Hi, > is there a R function that order a matrix according to some criteria > based on the rows(or cols) of that matrix? > > For example, let's sa...