s-news
[Top] [All Lists]

FW: [S] weird output

To: "S-PLUS Newsgroup (E-mail)" <S-news@wubios.wustl.edu>
Subject: FW: [S] weird output
From: Winfred Lambert <winnie@amu.ensco.com>
Date: Tue, 26 Sep 2000 13:41:11 -0400
Sender: owner-s-news@wubios.wustl.edu
All,

Per my recent email, Shawn Boles told me to try && instead of &, and I
noticed in my script that I used $ instead of & (that'll do it every
time!).  My mistake and I'm sorry to waste y'alls time.  Also, I tried
&& and it didn't work, FYI.

Win

> -----Original Message-----
> From: Winfred Lambert [mailto:winnie@amu.ensco.com]
> Sent: Tuesday, September 26, 2000 1:26 PM
> To: S-PLUS Newsgroup (E-mail)
> Subject: [S] weird output
> 
> 
> 
> All,
> 
> S-Plus 2000 on Windows 2000
> 
> I am trying to create some binary data from columns in a data frame.
> When I issue the command
> 
> > TTS.Predictors.Cats <- ifelse(Cool.TTS$Deck1.Hgt > 0 &
> Cool.TTS$Deck1.Hgt < 3048, 1, 0)
> 
> I think I am going to get 1's when the value is within the 
> range and 0's
> when it is not.  Instead, I get all NA's.  If I use one 
> condition or the
> other, it works properly, but I need to have 1's when both conditions
> are true, not just one.  What am I doing wrong?  Thanks for the help.
> 
> Win
> 
> ******************************************************
> Winifred C. Lambert, Senior Scientist/Meteorologist
> ENSCO Inc.
> Aerospace Sciences and Engineering Division
> 1980 N Atlantic Ave, Suite 230
> Cocoa Beach, FL 32931
> VOICE: 321.853.8130  FAX: 321.853.8415
> lambert.winifred@ensco.com
> 
> AMU Quarterly Reports on the Web:
> http://technology.ksc.nasa.gov/WWWaccess/AMU/home.html
> ******************************************************
> --------------------------------------------------------------
> ---------
> 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
> 
-----------------------------------------------------------------------
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

<Prev in Thread] Current Thread [Next in Thread>