similar to: SOAR - Stored object caches for R

Displaying 20 results from an estimated 9000 matches similar to: "SOAR - Stored object caches for R"

2005 Apr 14
0
g.data version 1.6, upgrade in response to changes in R-2.1.0
Version 1.6 of the "g.data" package is available on CRAN. The "g.data" package is used to create and maintain delayed-data packages (DDP's). Data stored in a DDP are available on demand, but do not take up memory until requested. You attach a DDP with g.data.attach(), then read from it and assign to it in a manner similar to S-Plus, except that you must run g.data.save() to
2005 Apr 14
0
g.data version 1.6, upgrade in response to changes in R-2.1.0
Version 1.6 of the "g.data" package is available on CRAN. The "g.data" package is used to create and maintain delayed-data packages (DDP's). Data stored in a DDP are available on demand, but do not take up memory until requested. You attach a DDP with g.data.attach(), then read from it and assign to it in a manner similar to S-Plus, except that you must run g.data.save() to
2005 Mar 11
3
delay() has been deprecated for 2.1.0
After a bunch of discussion in the core group, we have decided to deprecate the delay() function (which was introduced as "experimental" in R 0.50). This is the function that duplicates in R code the delayed evaluation mechanism (the promise) that's used in evaluating function arguments. The problem with delay() was that it was handled inconsistently (e.g. sometimes you would see
2006 Oct 19
0
Memory leak
This is a followup to the R-help thread, "Error: STRING_ELT() can only be applied to a 'character vector', not a 'builtin'". Thanks to Prof. Brian Ripley for suggesting the use of gctorture and valgrind. I am getting segmentation faults that appear to come from a memory leak. I now have a reproducible example (below). It requires the "g.data" package
2012 Apr 29
1
A doubt about substitute() after delayedAssign()
Hello, ?delayedAssign presents substitute() as a way to look at the expression in the promise. However, msg <- "old" delayedAssign("x", msg) msg <- "new!" x #- new! substitute(x) #- x (was 'msg' ?) Here, we just got 'x'... shouldn't we got 'msg'? Same result when the promise is not evaluated yet: delayedAssign("x",
2012 Apr 25
4
delayedAssign changing values
I'm not sure if this is a known peculiarity or a bug, but I stumbled across what I think is very odd behavior from delayedAssign. In the below example x switches values the first two times it is evaluated. > delayedAssign("x", {x <- 2; x+3}) > x==x [1] FALSE > delayedAssign("x", {x <- 2; x+3}) > x [1] 5 > x [1] 2 The ?delayedAssign documentation says
2013 May 16
3
Substitute / delayedAssign (was: Substitute unaware when promise objects are evaluated)
Duncan, Thank you for the clarification on how delayedAssign works. Should R-level interfaces to promise objects ever become available, I expect they would at time come in handy. On the subject of substitute and delayedAssign, I do have a follow-up question for the list. I'm trying to convert a named list of expression objects into an environment of promise objects. After conversion, each
2007 Feb 13
1
question on docs for delayedAssign and substitute
The help files for delayedAssign and substitute both say that substitute() can be used to see the expression associated with a promise. However, I can't see how to do that. When I try the example in help file for delayedAssign I don't see substitute() extracting the promise, e.g.: > msg <- "old" > delayedAssign("x", msg) > msg <-
2007 Sep 20
1
copying promise
1. Is there some way to copy a promise so that the copy has the same expression in its promise as the original. In the following we y is a promise that we want to copy to z. We want z to be a promise based on the expression x since y is a promise based on the expression x. Thus the answer to the code below is desired to be z=2 but its 1, 1 and y in the next three examples so they are not the
2015 Jan 27
0
Inspect a "delayed" assigned whose value throws an error?
>>>>> Henrik Bengtsson <hb at biostat.ucsf.edu> >>>>> on Mon, 26 Jan 2015 12:41:48 -0800 writes: > On Mon, Jan 26, 2015 at 12:24 PM, Hadley Wickham <h.wickham at gmail.com> wrote: >> If it was any other environment than the global, you could use substitute: >> >> e <- new.env() >>
2011 May 02
2
Using substitute to access the expression related to a promise
Hi all, The help for delayedAssign suggests that you can use substitute to access the expression associated with a promise, and the help for substitute says: "If it is a promise object, i.e., a formal argument to a function or explicitly created using ?delayedAssign()?, the expression slot of the promise replaces the symbol. But this doesn't seem to work: > a <- 1 > b <- 2
2013 Apr 03
1
Documentation error in subsitute
Hi all, The documentation for substitute currently reads: Substitution takes place by examining each component of the parse tree as follows: If it is not a bound symbol in ?env?, it is unchanged. If it is a promise object, i.e., a formal argument to a function or explicitly created using ?delayedAssign()?, the expression slot of the promise replaces the symbol. If it is an ordinary variable,
2002 Jan 16
0
round() doesn't (PR#1139)
Hi, all, In PR#1138 and PR#1139, I pointed out that round() with digits<0 would not actually round to an integer. Brian D. Ripley (hereafter BDR) fixed it in R-1.4.0, but the fix introduced a new error, PR#1254 (caught by Ole Christensen). BDR (I'm guessing) fixed the fix; here's the relevant line from fround.c: if(dig <= 0 && fabs(res) < 1e9) res = (int)floor(res +
2015 Jan 26
0
Inspect a "delayed" assigned whose value throws an error?
If it was any other environment than the global, you could use substitute: e <- new.env() delayedAssign("foo", stop("Hey!"), assign.env = e) substitute(foo, e) delayedAssign("foo", stop("Hey!")) substitute(foo) Hadley On Mon, Jan 26, 2015 at 12:53 PM, Henrik Bengtsson <hb at biostat.ucsf.edu> wrote: > Hi, I got an interesting programming
2015 Jan 26
2
Inspect a "delayed" assigned whose value throws an error?
On Mon, Jan 26, 2015 at 12:24 PM, Hadley Wickham <h.wickham at gmail.com> wrote: > If it was any other environment than the global, you could use substitute: > > e <- new.env() > delayedAssign("foo", stop("Hey!"), assign.env = e) > substitute(foo, e) > > delayedAssign("foo", stop("Hey!")) > substitute(foo) Hmm... interesting
2007 Jan 07
1
substitute creates an object whichprints incorrectly (PR#9427)
> I think we should get rid of source attributes completely, > since they are no longer needed, but your comment still > applies to source references. We should strip them when code > gets modified. > > Duncan Murdoch I would be very concerned about losing source attributes-- it would break a lot of my code :(! It's very useful to have a single portable R object that
2006 May 19
2
delayedAssign and interrupts
I noticed something recently that I thought was odd: delayedAssign("x", { Sys.sleep(5); 1 }) x ## Hit Ctrl-C within the first second or 2 gives me: > delayedAssign("x", { Sys.sleep(5); 1 }) > x ## Hit Ctrl-C within the first second or two > x Error: recursive default argument reference > My only problem here is that now I'm stuck---there's no way
2006 Oct 18
1
Error condition in evaluating a promise
Is there a way to raise an error condition when a promise is evaluated such that is can be evaluated again? Right now strange things happen when the evaluation fails: > delayedAssign("x", if (failed) stop("you have to initialize me first!") else foo) > foo <- "I'm foo" > failed<-TRUE > x Error: you have to initialize me first! > x
2002 Feb 20
1
Bug in "[<-.matrix"? (Was: Feature Request: "matrix[1:10,1:10, block=F] <- 1:10")
Thanks to David Meyer [david.meyer@ci.tuwien.ac.at] and David Brahm [brahm@alum.mit.edu] who suggested: m[ cbind(index.i, index.j) ] <- vals This works fine for the example I gave. Unfortunately, this approach doesn't extend to using the row and column names to make assignments: > m <- matrix("",ncol=3,nrow=3) > dimnames(m) <-
2001 Oct 22
1
round() doesn't (PR#1139)
R> round(100000/3, -2) - 33300 [1] -7.275958e-12 I would have hoped for 0. The problem seems to be specifically for negative "digits". This is in 1.3.1 on Solaris 2.6 (full description at bottom). [Apologies for making everyone read this 3 times; my bug.report() burped.] Peter Dalgaard <p.dalgaard@biostat.ku.dk> says the problem is in fround.c, which reads in part: