[Rd] "[.data.frame" allows un-named 3rd subscript (PR#989)

cberry@tajo.ucsd.edu cberry@tajo.ucsd.edu
Mon, 18 Jun 2001 22:10:29 +0200 (MET DST)


Since the Extract page has usage as:

     x[i, j, ... , drop=TRUE]

I would expect that 'drop=' would need to be given to the third 'subscript'

> diag(4)[ , 4 , 4 ] # Forgot 'drop=' or added extra ','
Error in diag(4)[, 4, 4] : incorrect number of dimensions
> 
> as.data.frame( diag(4) )[ , 4 , 4 ] # should return error, right?
[1] 0 0 0 1


Also note:

> diag(4)[ ,  , drop=TRUE ]
     [,1] [,2] [,3] [,4]
[1,]    1    0    0    0
[2,]    0    1    0    0
[3,]    0    0    1    0
[4,]    0    0    0    1
> 
> as.data.frame( diag(4) )[ ,  , drop=TRUE ]
Error in [.data.frame(as.data.frame(diag(4)), , , drop = 4) : 
	Argument "j" is missing, with no default
> 

--please do not edit the information below--

Version:
 platform = sparc-sun-solaris2.7
 arch = sparc
 os = solaris2.7
 system = sparc, solaris2.7
 status = 
 major = 1
 minor = 2.3
 year = 2001
 month = 04
 day = 26
 language = R

Search Path:
 .GlobalEnv, package:nls, package:nlme, package:ctest, Autoloads, package:base



Chuck

-- 
Charles C. Berry                        (858) 534-2098 
                                         Dept of Family/Preventive Medicine
E mailto:cberry@tajo.ucsd.edu	         UC San Diego
http://hacuna.ucsd.edu/members/ccb.html  La Jolla, San Diego 92093-0645

 

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._