[18910] in s-news-athena
Re: [S] S-PLUS 2000 problem
daemon@ATHENA.MIT.EDU (Steve McKinney)
Tue Aug 10 19:02:49 1999
Message-Id: <199908102255.PAA05897@enterprise.pulmcc.washington.edu>
Date: Tue, 10 Aug 1999 15:55:47 -0700 (PDT)
From: Steve McKinney <kilroy@enterprise.pulmcc.washington.edu>
Reply-To: Steve McKinney <kilroy@enterprise.pulmcc.washington.edu>
To: richards@toutatis.pci.upmc.edu
Cc: s-news@wubios.wustl.edu
Mime-Version: 1.0
Content-Type: TEXT/plain; charset=us-ascii
Content-Md5: HAIiZ55Tb9zNSV0Qyw3Uew==
I ran Leonid Gibiansky's code in Splus 5.1 on a Sun Solaris machine and got a different response
than him. The response I got seems logical and correct. I think there is a problem with Splus2000.
In any event, it would be nice if Splus gave consistent answers independent of the underlying
operating system.
enterprise% Splus
S-PLUS : Copyright (c) 1988, 1999 MathSoft, Inc.
S : Copyright Lucent Technologies, Inc.
Version 5.1 Release 1 for Sun SPARC, SunOS 5.5 : 1999
Working data will be in /home/kilroy/MySwork
> test <- data.frame(a=T,b=T,c=F)
> test
a b c
1 T T F
> test$a
[1] T
> test$b
[1] T
> test$c
[1] F
> test.vector <- c(test$a,test$b,test$c)
> test.vector
[1] T T F
>
q()
> Date: Tue, 10 Aug 1999 18:19:41 -0400 (EDT)
> From: tom richards <richards@toutatis.pci.upmc.edu>
> X-Sender: richards@toutatis
> To: "Gibiansky, Leonid" <GibiansL@globomax.com>
> Cc: "'splus'" <s-news@wubios.wustl.edu>
> Subject: Re: [S] S-PLUS 2000 problem
> Mime-Version: 1.0
> X-Loop: s-news
>
>
> > Just a warning:
> >
> > This is sufficiently bad by itself, but S-PLUS 2000 behaved
> > even worse:
> > > test <- data.frame(a=T,b=T,c=F)
> > > test
> > a b c
> > 1 TRUE TRUE FALSE
> > > test.vector <- c(test$a,test$b,test$c)
> > > test.vector
> > [1] 1 1 1
> > >
> > Is there any other known problems with S-PLUS 2000 ?
> > Thanks,
> > Leonid
>
> I don't think this is a bug in Splus 2000, Leonid. You defined, in the
> data frame test, three one-level factors, a,b, and c:
>
> > levels(test$a)
> [1] "TRUE"
> > levels(test$b)
> [1] "TRUE"
> > levels(test$c)
> [1] "FALSE"
>
> Then, when you stripped off the levels attribute to make the vector
> test.vector, Splus 2000 properly recorded the number of the level that was
> defined, 1 in each case. Consider the following example, which Splus 2000
> also handles correctly:
>
> > atest<-data.frame(a=factor("x",levels=c("x","y")),+
> b=factor("y",levels=c("x","y")),+
> c=factor("x",levels=c("x","y")))
> > atest.vector<-c(atest$a,atest$b,atest$c)
> > atest.vector
> [1] 1 2 1
>
> I'm not sure about Splus 4.5, though, because I just uninstalled it a few
> weeks ago!
>
> Tom
>
>
> :~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~:
> : Thomas J. Richards _/ _/ _/_/_/ _/_/ _/_/_/ :
> : Statistician _/ _/ _/ _/ _/ _/ _/ :
> : Biostatistics Center _/ _/ _/ _/ _/ _/ :
> : U. Pittsburgh Cancer Institute _/ _/ _/_/_/ _/ _/ :
> : 3600 Forbes Ave Suite 400A _/ _/ _/ _/ _/ _/ :
> : Pittsburgh, PA 15213 _/_/ _/ _/_/ _/_/_/ :
> : 412-647-6852 fax: 412-647-5687 :
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
> -----------------------------------------------------------------------
> This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
> send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
> message: unsubscribe s-news
\`|'/
(. .)
---uuu-U-uuu---
kilroy was here
Steven McKinney, Ph.D.
Statistician
Division of Pulmonary and Critical Care Medicine
Box 356522
University of Washington
Seattle, Washington 98195
Tel: 206-685-3030
Fax: 206-685-8673
e-mail: kilroy@u.washington.edu
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news