[Rd] Error condition in evaluating a promise
Duncan Temple Lang
duncan at wald.ucdavis.edu
Wed Oct 18 17:41:01 CEST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Simon.
One approach is RObjectTables. This provides a way to
customize how variables are accessed/assigned in
an environment and so allows an operation to do something
to compute the value of a variable while still allowing
it to be used as a variable rather than an explicit function
call by the user.
Otherwise, Seth's suggestion of an accessor function is the natural way.
This does arise often and we need an extensible SEXP facility
that allows us to capture some of the idioms that continue to arise.
D.
Simon Urbanek wrote:
> Martin,
>
> On Oct 17, 2006, at 11:43 PM, Martin Morgan wrote:
>
>
>>I believe the technique is to create an environment in the
>>namespace, and then to access that through functions:
>>
>
>
> thanks, but this is not what I want (the symbols in the environment
> are invisible outside) and it has nothing to do with the question I
> posed: as I was saying in the previous e-mail the point is to have
> exported variables in a namespace, but their value is known only
> after the namespace was attached (to be precise I'm talking about
> rJava here and many variables are valid only after the VM was
> initialized - using them before is an error). I have an ugly work-
> around for that as well, the question was whether promises could be
> used for that purpose as a more clean solution and the answer appears
> to be no - at least for R <=2.4.0.
>
> Thanks,
> Simon
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
- --
Duncan Temple Lang duncan at wald.ucdavis.edu
Department of Statistics work: (530) 752-4782
4210 Mathematical Sciences Building fax: (530) 752-7099
One Shields Ave.
University of California at Davis
Davis,
CA 95616,
USA
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)
iD8DBQFFNksN9p/Jzwa2QP4RAjXYAJ0cbGzw6IsCU62RWGxHDS7v1E4jzwCeOWSz
HGMaKhRjidss+7cu3gok2YU=
=3XhK
-----END PGP SIGNATURE-----
More information about the R-devel
mailing list