From Waclaw.Marcin.Kusnierczyk at idi.ntnu.no  Wed Jun  3 10:43:25 2009
From: Waclaw.Marcin.Kusnierczyk at idi.ntnu.no (Wacek Kusnierczyk)
Date: Wed, 03 Jun 2009 10:43:25 +0200
Subject: [Rd] Print bug for matrix(list(NA_complex_, ...))
In-Reply-To: <8b356f880906022219n77891154k583fecf59e96ecaf@mail.gmail.com>
References: <8b356f880906022219n77891154k583fecf59e96ecaf@mail.gmail.com>
Message-ID: <4A2637AD.4050801@idi.ntnu.no>

Stavros Macrakis wrote:
> In R 2.8.0 on Windows (tested both under ESS and under R Console in case
> there was an I/O issue)
>
> There is a bug in printing val <- matrix(list(NA_complex_,NA_complex_),1).
>
>   
>> dput(val)
>>     
> structure(list(NA_complex_, NA_complex_), .Dim = 1:2)
>
>   
>> print(val)
>>     
>
> [,1]
>
> [1,]
>
>
> [,2]
>
> [1,]
>
>
> Note that a large number of spaces are printed instead of NA.  

on ubuntu 8.04 with r 2.10.0 r48703 there is almost no problem (still
some unnecessary spaces):

     [,1]      [,2]    
[1,]        NA        NA



> Compare the
> unproblematic real case:
>
> print(structure(list(NA_real_, NA_real_), .Dim = 1:2))
>      [,1] [,2]
> [1,] NA   NA
>
> Also, when printed in the read-eval-print loop, printing takes a very very
> long time:
>
>   
>> proc.time(); matrix(list(NA_complex_,NA_complex_),1); proc.time()
>>     
>    user  system elapsed
>   74.35    0.09  329.45
>
> [,1]
>
> [1,]
>
>
> [,2]
>
> [1,]
>
>    user  system elapsed
>   92.63    0.15  347.86
>
> 18 seconds runtime!
>   

   user  system elapsed
  0.648   0.056 155.843
     [,1] [,2]
[1,]  NA   NA
   user  system elapsed
  0.648   0.056 155.843

vQ



[Rd] Print bug for matrix(list(NA_complex_, ...))
Wacek Kusnierczyk