[R] rJava and multicore

2011-11-20 Thread James McCreight
Hello MasteRs- Because I want to parallelize several calls to the glmulti package, what I'm essentially doing is trying to parallelize different calls to rJava. I'm using plyr functions which use foreach and then doMC which means multicore is my backend for parallelizing. I've tried several appro

[R] lubridate, as.POSIXct and a vector of times: bug or feature??

2011-05-27 Thread James McCreight
It took me some time to realize this annoying behavior was coming from lubridate. Perhaps this behavior is unexpected a result of cursory knowledge of it ## The expected behavior > sometimes=c(0,1,2,3)*60*60*24 > as.POSIXct( sometimes, origin='1970-01-01', tz='GMT') [1] "1970-01-01 GMT" "1970-

Re: [R] change function scope?

2011-05-26 Thread James McCreight
seems so obvious, but it would have been alot more head scratching. The help is very much appreciated! James On Thu, May 26, 2011 at 3:09 PM, James McCreight wrote: > I'm still getting used to R's scoping. I've run into the following > situation > > value=0 > th

[R] change function scope?

2011-05-26 Thread James McCreight
I'm still getting used to R's scoping. I've run into the following situation value=0 thefunction <- function() print( value ) somefunction <- function() { value=99; thefunction() } somefunction() now, I understand that somefunction() returns 0 because thefunction() was defined with value=0 in its

[R] vectorize subscript ranges?

2010-06-14 Thread James McCreight
Hi R'ers- I'll believe this can be done and that I'm just not clever enough. I'm trying to do this in 2D, but i think we have the same problem in 1D. #Assume you have some 1D time series d<-rnorm(100) #Say you want to get the average over intervals of different lengths #like from time 10 to tim