Re: [Rd] Very Long Expressions

From: Barry Rowlingson <B.Rowlingson_at_lancaster.ac.uk>
Date: Mon 24 Jan 2005 - 21:31:26 EST

McGehee, Robert wrote:

>>eval(parse(text = paste(rep(1, 498), collapse = "+")))

>
> [1] 498
>
> However, if we try this with 499+ items we get no answer:
>
>>a <- eval(parse(text = paste(rep(1, 499), collapse = "+")))
>>a

>
> Error: Object "a" not found
>
> And if this eval is passed to any other function, that function exits
> without error and without returning and object.

  Suggest you downgrade to R 1.8.1, which returns an error message:

  > eval(parse(text = paste(rep(1, 498), collapse = "+")))   [1] 498

  > a=eval(parse(text = paste(rep(1, 499), collapse = "+")))   Error in eval(expr, envir, enclos) : evaluation is nested too deeply:   infinite recursion?

  I dont have an R 1.9.x handy at the moment.

  Baz



R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Mon Jan 24 21:26:02 2005

This archive was generated by hypermail 2.1.8 : Mon 24 Jan 2005 - 23:23:11 EST