From oncley@ucar.edu  Thu Mar 11 16:34:36 1999
From: oncley@ucar.edu (oncley@ucar.edu)
Date: Thu, 11 Mar 1999 17:34:36 +0100
Subject: exists finds objects lots of places! (PR#142)
Message-ID: <199903111634.RAA11500@biostat.ku.dk>

Full_Name: Steve Oncley
Version: 0.63.3
OS: Redhat5.2 i386 
Submission from: 128.117.80.159 (128.117.80.159)


"exists" finds object UP TO the position it is in
> search()
[1] ".GlobalEnv"   "Autoloads"    "package:base"
> exists("ls",1)
[1] TRUE
> exists("ls",2)
[1] TRUE
> exists("ls",3)
[1] TRUE
> x <- 1
> exists("x",1)
[1] TRUE
> exists("x",2)
[1] FALSE
> exists("x",3)
[1] FALSE

whereas, S+ only finds the one position where the object is:
> search()
 [1] ".Data"                                    
 [2] "/net/aster/splus3.4/local/.Data"          
 [3] "/net/aster/splus3.4/splus/.Functions"     
 [4] "/net/aster/splus3.4/stat/.Functions"      
 [5] "/net/aster/splus3.4/s/.Functions"         
 [6] "/net/aster/splus3.4/s/.Datasets"          
 [7] "/net/aster/splus3.4/stat/.Datasets"       
 [8] "/net/aster/splus3.4/splus/.Datasets"      
 [9] "/net/aster/splus3.4/library/Matrix/.Data" 
[10] "/net/aster/splus3.4/library/trellis/.Data"
> exists("ls",1)
[1] F
> exists("ls",2)
[1] F
> exists("ls",3)
[1] F
> exists("ls",4) 
[1] F
> exists("ls",5)
[1] T
> exists("ls",6)
[1] F


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


exists finds objects lots of places! (PR#142)
oncley@ucar.edu