[R] seq(2,5,-2) not an error but NULL
    Robin Hankin 
    r.hankin at noc.soton.ac.uk
       
    Mon Mar 27 16:10:16 CEST 2006
    
    
  
Hi Duncan et al
>
> I don't think seq() could reasonably be expected to handle "to" and  
> "by" arguments with complex values.  Trying to divide the (to-from)  
> difference by (by) to find how many steps to take would usually  
> result in enough rounding error that the result wouldn't be real- 
> valued.  It's enough of a miracle that it correctly handles
>
> seq(from=1, by=1+1i, len=4)
>
> Duncan Murdoch
>
well it depends on your definition of miracles, but I wouldn't say
1 + (0:3) * (1+1i)
is particularly miraculous ;-\
best wishes
rksh
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
  tel  023-8059-7743
    
    
More information about the R-help
mailing list