[R] Index vectors get overwriten ?!

Roger Bivand rsb at reclus.nhh.no
Thu May 3 15:27:10 CEST 2001


On Thu, 3 May 2001, Thomas Bruns wrote:

> For some analysis of a mesh structure I need to prepare several vectors
> of indexes of different length. This is done by the following code
> sequence (including diagnostic output):
> #--------------------------------------------------
> MT_ind <- which(V1.frame[,2] %in% mm[,1])

Since the underscore is an old assignment token, I think you are seeing
multiple assigns to "ind":

> ls()
character(0)
> a <- 1
> ls()
[1] "a"
> b_a
> b
[1] 1
> ls()
[1] "a" "b"

Hope this helps,

Roger

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
e-mail: Roger.Bivand at nhh.no
and: Department of Geography and Regional Development, University of
Gdansk, al. Mar. J. Pilsudskiego 46, PL-81 378 Gdynia, Poland.

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list