Displaying 6 results from an estimated 6 matches for "findvarinframe3".
2007 Mar 28
1
checking existence of active bindings
...ot;methods" "base"
other attached packages:
abind g.data chron fCalendar fEcofin
"1.1-0" "1.6" "2.3-10" "240.10068" "240.10067"
>
From looking at the source, the exists() calls function
findVarInFrame3() (envir.c) with doGet=FALSE. The comments for the
argument doGet on findVarInFrame3() say:
The final argument is usually TRUE and indicates whether the
lookup is being done in order to get the value (TRUE) or
simply to check whether there is a value bound to the specified
symbol in...
2014 Dec 03
2
we need an exists/get hybrid
...and 'get' are often used in conjunction. Both functions are
different usages of the do_get C function, so it's a pity to run that twice.
"get" gives an error when a symbol is not found, so you can't just do a
'get'. With R's C library, one might do
SEXP x = findVarInFrame3(symbol,env);
if (x != R_UnboundValue) {
// do stuff with x
}
It would be very convenient to have something like this at the R level. We
don't want to do any tryCatch stuff or to add args to get (That would kill
any speed advantage. The overhead for handling redundant args accounts for
30%...
2014 Dec 03
2
we need an exists/get hybrid
...s are
> > different usages of the do_get C function, so it's a pity to run that
> twice.
> >
> > "get" gives an error when a symbol is not found, so you can't just do a
> > 'get'. With R's C library, one might do
> >
> > SEXP x = findVarInFrame3(symbol,env);
> > if (x != R_UnboundValue) {
> > // do stuff with x
> > }
> >
> > It would be very convenient to have something like this at the R level.
> We
> > don't want to do any tryCatch stuff or to add args to get (That would
> kill
> >...
2010 May 13
2
What functions are called internally in R to resolve what variable is referred?
Hello All,
If I refer to a variable 'x', 'x' will be searched in the current
frame or the parent frame, or the parent of the parent frame, etc.,
until it is found (or not found at all)? Could you please show me what
code in R source that handles this? Is it in the C code or the R code?
Thanks,
Tom
2014 Dec 03
0
we need an exists/get hybrid
...used in conjunction. Both functions are
> different usages of the do_get C function, so it's a pity to run that twice.
>
> "get" gives an error when a symbol is not found, so you can't just do a
> 'get'. With R's C library, one might do
>
> SEXP x = findVarInFrame3(symbol,env);
> if (x != R_UnboundValue) {
> // do stuff with x
> }
>
> It would be very convenient to have something like this at the R level. We
> don't want to do any tryCatch stuff or to add args to get (That would kill
> any speed advantage. The overhead for handlin...
2014 Dec 04
0
we need an exists/get hybrid
...es of the do_get C function, so it's a pity to run that
> > twice.
> > >
> > > "get" gives an error when a symbol is not found, so you can't just do a
> > > 'get'. With R's C library, one might do
> > >
> > > SEXP x = findVarInFrame3(symbol,env);
> > > if (x != R_UnboundValue) {
> > > // do stuff with x
> > > }
> > >
> > > It would be very convenient to have something like this at the R level.
> > We
> > > don't want to do any tryCatch stuff or to add args to g...