From B.Rowlingson at lancaster.ac.uk  Mon Jan 24 11:31:26 2005
From: B.Rowlingson at lancaster.ac.uk (Barry Rowlingson)
Date: Mon Jan 24 11:31:31 2005
Subject: [Rd] Very Long Expressions
In-Reply-To: <67DCA285A2D7754280D3B8E88EB5480206741E2E@MSGBOSCLB2WIN.DMN1.FMR.COM>
References: <67DCA285A2D7754280D3B8E88EB5480206741E2E@MSGBOSCLB2WIN.DMN1.FMR.COM>
Message-ID: <41F4CE7E.9070909@lancaster.ac.uk>

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


[Rd] Very Long Expressions
Barry Rowlingson