From rgentlem@stat.auckland.ac.nz  Mon Oct 16 16:06:30 2000
From: rgentlem@stat.auckland.ac.nz (Robert Gentleman)
Date: Tue, 17 Oct 2000 04:06:30 +1300
Subject: [Rd] print problem with data frames (PR#698)
In-Reply-To: <200010161301.PAA02685@pubhealth.ku.dk>; from J.C.Rougier@durham.ac.uk on Mon, Oct 16, 2000 at 03:01:28PM +0200
References: <200010161301.PAA02685@pubhealth.ku.dk>
Message-ID: <20001017040630.A25302@stat1.stat.auckland.ac.nz>

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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


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