[Rd] print problem with data frames (PR#698)

Robert Gentleman rgentlem@stat.auckland.ac.nz
Tue, 17 Oct 2000 04:06:30 +1300


This is known (at least to some of us) and there are other problems
with data frames and their printing. Hopefully I will have some 
fixes for 1.2.

  Robert

On Mon, Oct 16, 2000 at 03:01:28PM +0200, J.C.Rougier@durham.ac.uk wrote:
> Another one from the student computer practicals: it is possible
> to create a dataframe that cannot be printed.  Thus
> 
> > fred <- data.frame(happy=c(TRUE, FALSE, TRUE), sad=7:9)
> > tmp <- fred[c(FALSE, FALSE, TRUE, TRUE)] # no error message!
> > tmp
> Error in as.matrix.data.frame(x) : dim<- length of dims do not match the length of object
> > print.default(tmp)
> $"NA"
> NULL
> 
> $"NA"
> NULL
> 
> attr(,"class")
> [1] "data.frame"
> 
> This obviously relates to my previous posting to r-devel about
> subscripting objects with logical vectors that are not the right
> length.
> 
> Cheers, Jonathan.
> 
> --please do not edit the information below--
> 
> Version:
>  platform = sparc-sun-solaris2.7
>  arch = sparc
>  os = solaris2.7
>  system = sparc, solaris2.7
>  status = 
>  major = 1
>  minor = 1.1
>  year = 2000
>  month = August
>  day = 15
>  language = R
> 
> Search Path:
>  .GlobalEnv, Autoloads, package:base
> 
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

-- 
+-------------------------------------------------------------------------+
| Robert Gentleman              phone : (64-9) 3737-599 ext 3946          | 
| Senior Lecturer               fax :   (64-9) 3737-018                   |
| Department of Statistics      office : Room 206 Maths/Physics           |
| University of Auckland	email : rgentlem@stat.auckland.ac.nz      |
+-------------------------------------------------------------------------+
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._