Message-ID: <alpine.LFD.1.00.0803171121060.28698@gannet.stats.ox.ac.uk>
Date: 2008-03-17T11:27:34Z
From: Brian Ripley
Subject: contextstack overflow
In-Reply-To: <000501c8881d$7b56bbd0$c230a8c0@imed.intern>
On Mon, 17 Mar 2008, Gisela Sturm wrote:
> I?m an absolute beginner in R programming?I have a really long R-code with
> many variables. When I run the program I always get an error at the same
> place called ?contextstack overflow?. Does anybody know what to do in this
> case? Are there so strict limitations in R? If yes, is it possible to handle
> it? How?
There are limits, and they are quite high -- it is far more likely that
you have an error in your R code.
In this particular case, it is saying that you have more than 50 nested
parse contexts -- that is nested if, [, [[, {, ( calls.
I find it helpful to use a syntax-aware editor (e.g. ESS) as that will
highlight these things for you via indentation patterns.
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595