Re: [Rd] Print bug for matrix(list(NA_complex_, ...))

From: Wacek Kusnierczyk <Waclaw.Marcin.Kusnierczyk_at_idi.ntnu.no>
Date: Wed, 03 Jun 2009 10:43:25 +0200

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



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed 03 Jun 2009 - 08:53:47 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 03 Jun 2009 - 10:35:05 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive