search for: order

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

2006 Jan 09
2
decide between polynomial vs ordered factor model (lme)
...4) within smallgroups (=gru) (n = 28), i.e. n = 4 * 28 = 112 persons and 112 * 6 = 672 data points library(nlme) fitlme7 <- lme(nachw ~ I(zeitn-3.5) + I((zeitn-3.5)^2) + I((zeitn-3.5)^3) + I((zeitn-3.5)^4)*gru, random = list(subgr = ~ 1, subject = ~ zeitn), data = hlm3) fit5 <- lme(nachw ~ ordered(I(zeitn-3.5))*gru, random = list(subgr = ~ 1, subject = ~ zeitn), data = hlm3) anova( update(fit5, method="ML"), update(fitlme7, method="ML") ) > anova( update(fit5, method="ML"), update(fitlme7, method="ML") ) Model df...
2002 Sep 03
0
FIX for old and new problems with order(): order fails with na.last=NA (PR#1981)
I recently reported order() to ignore decreasing=TRUE with na.last=NA. Now I discovered two other problems and send corrected code. Best regards Jens Oehlschlägel # PROBLEM 1 see PR#1906 # PROBLEM 2 > order(1, na.last=NA) Error in apply(sapply(z, is.na), 1, any) : dim(X) must have a positive length # clea...
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
Hi all, I'm working on a loop function for a large dataset which contains 1000 different groups. I would like to reconstruct the order of events within each group by using a loop function in R. (Currently the order of events are based on the ascending order of prev_event within the group) A demo data frame: event prev_event group 845 0 5360 926 153 5360 993 234...
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 id...
2003 Aug 18
0
apply and sort vs vectorized order
Dear all, Trying to solve a problem I had (see thread "putting NAs at the end" ) I've noticed a difference in system time requirements between using apply and sort (or order) to order each row or column of a matrix compared to a vectorized function I wrote. Using apply is much faster when the number of loops (number of rows or columns to order) is low BUT much slower when number of loops are high and the other dimension short. Here is my function: order.rc<-functi...
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 help files, various articles and books I have come across a number of suggestions for combining analyses (mostly regression or other linear models) usi...
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...
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, but after skimming Duncan Smith's recent work on pres...
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...
2007 Nov 23
4
help pleaseeeeeeeee
...ries 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 ............ res.ar<-ar(x,aic=TRUE,demean=F) Error in if (order > 0) coefs[order, 1:order] else numeric(0) : missing value where TRUE/FALSE needed In addition: Warning messages: 1: In log(var.pred) : NaNs produced 2: In if (order > 0) coefs[order, 1:order] else numeric(0) : the condition has length > 1 and only the first element will be used For m...
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 ve...
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...
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 noticed that when params[:id] is nil, the finder still retrieves an...
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...
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 longer ordered Jens?Oehlschl?gel ? ? P.S: The above e...
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...
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, does it make sense to canonicalizing the order of LSR-hoisted loop invar...
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 ass...