search for: someindex

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

2007 Oct 20
1
Getting at what a named object represents in a function...
...9;s wrong/ambiguous). Imagine its like this (actual values are unimportant) and called mylist: >mylist A B 1 5 2 5 3 6 4 8 5 0 I have a function: foo = function(param){ #modify list A or B values depending on whether A or B's passsd in (via 'param') param[someindex]=another_value #doesn't change value in lits$A or list$B (whichever's been passed in as 'param') #I want something like: #if 'param' is list$A then list$A[someindex]=another_value #else if 'param' is list$B then list$B[some_index] = another_value } I then call th...
2011 Jul 05
2
Usage of DateRangeValueProcessor
Hi, I have been playing with Djapian recently, and am running into a problem where I have the following setup: class SomeIndexer(Indexer): fields = [ 'actual_date_of_arrival', ] tags = [ ('ata', 'actual_date_of_arrival'), ] Some model instances exist with dates like 2011/07/04 and 2011/07/04 and my search should yield all model instances within the range 2011/07/04...
2005 Feb 16
3
real and complex vectors
The following caught me off-guard: R> z <- 1i + 1:10 R> z <- Re(z) R> z [1] 1 2 3 4 5 6 7 8 9 10 as expected. But look: R> z <- 1i + 1:10 R> make.real <- abs(z) < 1000 R> z[make.real] <- Re(z[make.real]) R> z [1] 1+0i 2+0i 3+0i 4+0i 5+0i 6+0i 7+0i 8+0i 9+0i 10+0i R> didn't make z a real vector, which is what I wanted.