dimname'less array breaks apply (PR#318)

About this list Date view Thread view Subject view Author view Other groups

Subject: dimname'less array breaks apply (PR#318)
cberry@tajo.ucsd.edu
Date: Thu 11 Nov 1999 - 10:48:49 EST


Message-Id: <199911110048.BAA27356@pubhealth.ku.dk>

<<insert bug report here>>

> apply(array(1:20,c(2,2,5)),2:3,function(x) x)
Error: length of dimnames must match that of dims
>

Changing:

dimnames = if (is.null(dn.ans)) list(ans.names, NULL) else c(list(ans.names), dn.ans)

To:

dimnames = if (length(dn)==0) NULL else
           if (is.null(dn.ans)) list(ans.names, NULL) else c(list(ans.names), dn.ans)

seems to fix this.

Chuck Berry

--please do not edit the information below--

Version:
 platform = sparc-sun-solaris2.7
 arch = sparc
 os = solaris2.7
 system = sparc, solaris2.7
 status = Release
 major = 0
 minor = 65.1
 year = 1999
 month = October
 day = 07
 language = R

Search Path:
 .GlobalEnv, Autoloads, package:base

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


About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b25 : Tue 04 Jan 2000 - 14:16:10 EST