[R] problem using ts after tapply

Colin Farrow c.farrow at compserv.gla.ac.uk
Thu Jul 27 13:35:59 CEST 2000


here is a distillation of a problem encountered in transfering some
working code from R-0.63 to R-1.1.0

a1 <- 1:10
b1 <- tapply(a1,a1, sum)
c1 <- ts(b1)
c1
Error in if (NCOL(x) == 1) { : missing value where logical needed

note that the error is returned as the value of calling ts() and is not
automatically displayed

problem seems to be that 
is.array(b1) returns TRUE
yet dim(b1) returns 10

bug or feature or am I missing something?

platform i686-pc-linux-gnu
arch     i686             
os       linux-gnu        
system   i686, linux-gnu  
status                    
major    1                
minor    1.0              
year     2000             
month    June             
day      15               
language R 

with grateful thanks to R-core for a wonderful tool.

-- 
Colin Farrow
Computing Service, University of Glasgow, Glasgow G12 8QQ
Tel: 0141 330 4862, c.farrow at compserv.gla.ac.uk
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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