[R] Get message "cannot do complex assignments in base namespace" error

Thon de Boer thondeboer at yahoo.com
Sun Dec 21 08:45:07 CET 2003


I am constantly running into the problem where I get
error messages like "cannot do complex assignments in
base namespace".

It might have something to do with the fact that R has
not started up completely, since I am trying to run
some R script using Rterm < Rscript.R.

When I perform the same script in a Interactive R
session, the R script has no problem with the
assignments that it deems complex (like assgining a
new value to a slot in a class object).

Also, when I encapsulate the offending scripts inside
a local({ ... }) block, I also do not get the error,
so my theory is that my script is being run in the
wrong namespace, or R has not completely started up
yet or something.

Does anyone have an idea how I can fix this, without
having to run within the local block?

Thanks,

Thon de Boer




More information about the R-help mailing list