search for: ordered

Displaying 20 results from an estimated 54812 matches for "ordered".

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 # clearly wrong as > order(1) [1] 1 # is defined # PROBLEM 3 >
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
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
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
2012 Aug 20
1
Combining imputed datasets for analysis using Factor Analysis
...rshmallows" Running on Linux version 3.3.8-gentoo (root at PsychStat) (gcc version 4.5.3 (Gentoo 4.5.3-r2 p1.5, pie-0.4.7) ) Script for multiple imputation: > var.info <- mi.info(LRN) > var.info > var.info <- update(var.info, "type", list("LRN1" = "ordered-categorical", "LRN2" = "ordered-categorical", "LRN3" = "ordered-categorical", "LRN4" = "ordered-categorical", "LRN5" = "ordered-categorical", "LRN6" = "ordered-categorical", "LRN7" =...
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()
...tters[1:5],y=c(3,9,2,1,10)) #This produces a dataframe in alphebitical order with row numbers in #numerical order. > xy x y 1 a 8.921657 2 b 10.314625 3 c 9.531537 4 d 10.818563 5 e 9.084872 #If I re-order the data based on the value of y xy<-xy[order(y),] #I get a dataframe ordered by y but the row numbers are still in #alphebetical order based on x > xy x y 1 a 8.921657 5 e 9.084872 3 c 9.531537 2 b 10.314625 4 d 10.818563 #I then try to plot the data and it plots it in alphabetical instead of #numeric order library(lattice) barchart(y~x, data=xy) Why are...
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 longer ordered Jens?Oehlschl?gel ? ? P.S: The above exa...
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