[R] dump not evaluating promises?
Duncan Murdoch
murdoch.duncan at gmail.com
Fri Apr 30 18:57:32 CEST 2010
On 30/04/2010 12:07 PM, D Sonderegger wrote:
> dump and dput but have the same behavior but dump has an extra option
> 'evaluate'. From the documentation, 'evaluate=TRUE' looks like it should
> force promises to be evaluated, ie convert 1:6 to be c(1,2,3,4,5,6).
>
Both 1:6 and c(1,2,3,4,5,6) are expressions, and they evaluate to
different things. (1:6 is an integer vector, the other is a "numeric"
vector, stored in floating point.) dump() is just trying to give more
concise output. Look more closely at Peter's example.
Duncan Murdoch
> I think that either my understanding of what a 'promise' is and what it
> means to be evaluated is flawed, or the evaluate option in the dump command
> is broken.
>
More information about the R-help
mailing list