[R] Evaluating Assignment-Operator R 2.0.0

Peter Dalgaard p.dalgaard at biostat.ku.dk
Fri Oct 8 12:21:51 CEST 2004


"friedemann" <friedemann at gehrt.info> writes:

> With R 2.0.0 (w2k-installation) the "superassignment" operator '<<-' seems to 
> have a different behaviour compared with R 1.9.1 :
> 
>   > x<<-4
>   > x
>   [1] 4
>   > attr(x,'y')<<-5
>   Error: Object "x" not found
>   >
> 
> Using earlier versions of R I never got this error.
> 
> In the NEWS file and the docs coming along with R 2.0.0 I did not found 
> anything concerning this problem.

It's there. Look for "complex superassignment".

> AFAIK '=' instead of '<<-' works - but is allowed only for toplevel-
> assignments. 

Eh? You mean "assignments in the current environment"? 

Why do you want to use <<- at top level (the command-line) anyway? 

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list