[R] Get message "cannot do complex assignments in base namespace" error
Thon de Boer
thondeboer at yahoo.com
Sun Dec 21 20:40:04 CET 2003
Good...It is getting clearer now and I indeed read
?Startup so that is why I knew i had to use local()
blocks (or use the .First function, but that does not
seem to work in Rterm) in the first place. The problem
there, is that any of the objects that are created in
the local block are afcourse no longer visible when
the R is started. (I know....I want it all....;-))
The reason for using the R_PROFILE variable was
because there seem to be only one USER profile file
that I can use that has a fixed name '.Rprofile' and
from my application I would like to be able to use one
R startup script that simply got the R script name as
its argument. (I guess I could create this .Rprofile
on the fly each time I want to run my program)
Would there be a way to specify on the command line to
use a different profile file on the command line of
Rgui?
Although I have read that 'code gets installed in base
namespace' I still don't understand what it means. Why
was my assignment of new data to a slot in a class
object deemed to be impossible? Was I overwriting
something without knowing it? I had named the variable
i that contained the class object and was that
variable used in base namespace or something?
What I am trying to do is to have the user of my
system only write one script that he could execute
either with the Rgui or the Rterm program for GUI and
BATCH processing. For most of the things the R_PROFILE
hack seem to work, but indeed is not elegant or even
misusing the functionality) so any help in how to set
this up would be apreciated
Thanks again for the help
Thon
--- Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
> On Sun, 21 Dec 2003, Thon de Boer wrote:
>
> > Thanks for the fast reply.
> >
> > When I use --vanilla for Rterm.exe (Using windows
> > here) I do not get the problem anymore, so that
> solved
> > half my problems. Thanks (I had used --slave
> --no-save
> > --no-restore)
> >
> > But I seem to have the problem of getting the
> error
> > message "cannot do complex assignments in base
> > namespace" when I try to run Rgui.exe.
>
> The following is the critical piece of information
> you omitted
> in your first post.
>
> [...]
>
> > I had to resort to setting the R script as the
> > R_PROFILE environment variable to force Rgui to
> start
> > the R script I give it.
>
> That's your problem, and it is bad practice.
> ?Startup does explain why
> you needed to use local().
>
> You are misusing the site profile; you could equally
> have used a user
> profile or .First or ....
>
> --
> 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
>
More information about the R-help
mailing list