search for: ordering

Displaying 20 results from an estimated 54810 matches for "ordering".

2006 Jan 09
2
decide between polynomial vs ordered factor model (lme)
Dear alltogether, two lme's, the data are available at: http://www.anicca-vijja.de/lg/hlm3_nachw.Rdata explanations of the data: nachw = post hox knowledge tests over 6 measure time points (= equally spaced) zeitn = time points (n = 6) subgr = small learning groups (n = 28) gru = 4 different groups = treatment factor levels: time (=zeitn) (n=6) within subject (n=4) within smallgroups
2002 Sep 03
0
FIX for old and new problems with order(): order fails with na.last=NA (PR#1981)
...der(1, na.last=NA) Error in apply(sapply(z, is.na), 1, any) : dim(X) must have a positive length # clearly wrong as > order(1) [1] 1 # is defined # PROBLEM 3 > order(c(NA, NA), na.last=NA) Error in order(c(NA, NA), na.last = NA) : all elements contain an NA # The help file promises ordering indices to all non-NA elements. # Thus, if all elements are NA, consequently the result should be integer(0) # The prototype also returns integer(0) and additionally gives a warning from sort.list() # Here are fixes for all three problems # save old version for comparision below old.order <-...
2016 Jul 01
1
silk_warped_autocorrelation_FIX() NEON optimization
Hi all, I'm sending patch "Optimize silk_warped_autocorrelation_FIX() for ARM NEON" in an separate email. It is based on Tim’s aarch64v8 branch https://git.xiph.org/?p=users/tterribe/opus.git;a=shortlog;h=refs/heads/aarch64v8 Thanks for your comments. Linfeng
2011 Oct 12
3
loop function within a loop
...29 719 189 2329 119 324 2329 761 355 2329 890 372 2329 266 719 2329 324 761 2329 189 890 2329 355 913 2329 Below is what I have written: ordering <- vector("list", length(unique(mydata$group))) for (j in 1:length(unique(mydata$group))){ group.j <- mydata[mydata$group == unique(mydata$group)[j], ] ordering.j <- c() ordering.j[1] <- ifelse(group.j[1, ]$prev_event == 0, group.j[1, ]$event, group.j[1, ]$prev_event) for (i i...
2006 Feb 14
6
[newb] Find vs Find :all question
I''m playing out with writing an online store. So far it has accounts, addressbooks, and orders, and those 3 are tied together with an customer ID. I also have orderDetails, which are associated to the order via an order number. See models below... When I do the following I can access the orderDetails information just fine: @order = Order.find(params[:id]) # i pass it a customer
2003 Aug 18
0
apply and sort vs vectorized order
...order/(max(A.order,na.rm=TRUE)*10) # makes NAs=0 (na.last=FALSE) or NAs=0.9 (na.last=TRUE) # NOTE: if decreasing is TRUE NAs are the inverse of above if ((na.last & !decreasing) | (!na.last & decreasing)) A.order[which(is.na(A.order))]<-0.9 else A.order[which(is.na(A.order))]<-0 # if ordering each row the integer part of A is the column index (row.column=1) # else, we are ordering each column so the integer part of A is the column index if (row.column==1) A.order<-A.order+rep(1:nrow(A),ncol(A)) else A.order<-A.order+rep(1:ncol(A),each=nrow(A)) # returns either a matrix with sort...
2012 Aug 20
1
Combining imputed datasets for analysis using Factor Analysis
Dear R users and developers, I have a dataset containing 34 variables measured in a survey, which has some missing items. I would like to conduct a factor analysis of this data. I tested mi, Amelia, and MissForest as alternative packages in order to impute the missing data. I now have 5 separate datasets with the variables I am interested in factor analysing. In my reading of the package
2007 May 30
9
Specify attr_protected
This is kind of a two part question. Question One: I want to be sure that an Order model is protecting sensitive attributes from mass assignment. The example looks like this: describe Order do it "should protect total attribute from mass assignment" do @order = Order.new(:total => 0.05) @order.total.should_not == 0.05 end end And the code to implement it: class Order
2015 May 18
2
[LLVMdev] [LSR] hoisting loop invariants in reverse order
It's not caused by "the insertion point is set to the default after". I should mention the reason somewhere earlier. "Reversing the order of arg0~3 is not intentional. The user list of pixel_idx happens to have pixel_idx+3, pixel_idx+2, and pixel_idx+1 in this order, so LSR simply follows this order when collecting the LSRFixups." I'm not an expert on uselist orders,
2006 Jan 15
6
Saving one-many associations (elegant solution please)
What is the most elegant way to save new one-many associations? order = Order.new(:name => "My Order") order.line_items << LineItem.new(:product_id => 1, :quantity => 2) order.line_items << LineItem.new(:product_id => 2, :quantity => 5) order.save The above - which is by far the most elegant way of putting it - doesn''t work for me - the line_items
2007 Nov 23
4
help pleaseeeeeeeee
Dears Sirs During my computational work I encountered unexpected behavior when calling "ar" function, namely # time series x<-ts(c(-0.2052083,-0.3764986,-0.3762448,0.3740089,0.2737568,2.8235722,- 1.7783313,0.2728676,-0.3273164),start=c(1978,3),frequency=4,end=c(1980,3)) # ar function res.ar<-ar(x,aic=TRUE,demean=F) # call "ar" again and ............
2013 Apr 16
6
I don't understand the 'order' function
I thought I've understood the 'order' function, using simple examples like: order(c(5,4,-2)) [1] 3 2 1 However, I arrived to the following example: order(c(2465, 2255, 2085, 1545, 1335, 1210, 920, 210, 210, 505, 1045)) [1] 8 9 10 7 11 6 5 4 3 2 1 and I was completely perplexed! Shouldn't the output vector be 11 10 9 8 7 6 4 1 2 3 5 ? Do I have a damaged
2010 May 06
1
bar order using lattice barchart()
Dear List, I am want to plot my data in increasing order using the lattice barchart() function. I used order() to put my data in the order I want, but when I plot it I get the original order of the data. I think this has to do with the row index number since order() does not re-number the rows in the new order but instead keeps the original row numbers and puts them in a different order. For
2007 Mar 07
4
Strange Problem With Unwanted, Transient Caching
Hello, I hope somebody can explain to me what''s going on here because I''m baffled! In a controller''s action I want to create a new order for a customer. Because I post back to the same action (not RESTful I know, but that''s for another day) I use code like this: def edit @order = Order.find_by_id(params[:id]) || Order.new ... end I
2012 Jul 22
5
Reorder in decreasing order
reorder() is probably the best way to order the levels in a vector without manually specifying the order. But reorder() orders by default in an increasing order: "The levels are ordered such that the values returned by ?FUN? are in increasing order." Is there a way to do what reorder() does, but order the levels according to a _decreasing_ order of the values? Sverre
2017 Jun 16
3
'ordered' destroyed to 'factor'
Dear all, ? I don't know if you consider this a bug or feature, but it breaks reasonable code: 'unlist' and 'sapply' convert 'ordered' to 'factor' even if all levels are equal. Here is a simple example: o <- ordered(letters) o[[1]] lapply(o, min)[[1]]??????????# ordered factor unlist(lapply(o, min))[[1]]? # no longer ordered sapply(o, min)[[1]]??????????# no
2009 Oct 07
2
"Overriding" association build methods
Hey everyone I have (in a nutshell) two models: Customer and Order. Customer has_many Orders and Order belongs_to Customer. The Order model contains fields such as name, address and phone that mirror the associated Customer''s fields at the time the order was placed. The reason for this is that if the customer changes their details then the order contains the details that were current
2004 Oct 04
11
inverse function of order()
I have: d <- sample(10:100, 9) o <- order(d) r <- d[o] How I can get d (in the original order), knowing only r and o? Thanks - Wolfram
2015 May 09
4
[LLVMdev] [LSR] hoisting loop invariants in reverse order
Hi, I was tracking down a performance regression and noticed that LoopStrengthReduce hoists loop invariants (e.g., the initial formulae of indvars) in the reverse order of how they appear in the loop. This reverse order creates troubles for the StraightLineStrengthReduce pass I recently add. While I understand ultimately SLSR should be able to sort independent candidates in an optimal order,
2006 Jan 06
6
HABTM problem not saving all associations
Hello all, I have an Order object that has and belongs to many Products and has and belongs to many Loan Types. This is so I can select multiples of each in my order entry screen via checkbox groups. I''m having some trouble with saving multiple HABTM associations for a single model object; only the first HABTM association declared in the model will save during the initial @order.save