From elff at sowi.uni-mannheim.de  Sun Apr  1 15:32:10 2007
From: elff at sowi.uni-mannheim.de (Martin Elff)
Date: Sun, 1 Apr 2007 15:32:10 +0200
Subject: [Rd] checking existence of active bindings
In-Reply-To: <460AE471.3040702@acm.org>
References: <460AE471.3040702@acm.org>
Message-ID: <200704011532.11148.elff@sowi.uni-mannheim.de>

On Wednesday 28 March 2007 23:56, Tony Plate wrote:
> Is there any way to check whether an active binding exists without
> actually calling the active binding?  I'd like to be able to do
> something like exists("x", ...) and know whether "x" exists without
> actually fetching its value if it is an active binding (because it could
> consume significant resources to fetch the value).
>
>  > exists("x", inherits=FALSE)
>
> getting x1
> [1] TRUE
>

As you most probably found out for yourself - this works
as intended.
> "x" %in% ls(globalenv())
[1] TRUE


Best,

Martin



[Rd] checking existence of active bindings
Martin Elff