s-news
[Top] [All Lists]

[S] weird output

To: "S-PLUS Newsgroup (E-mail)" <S-news@wubios.wustl.edu>
Subject: [S] weird output
From: Winfred Lambert <winnie@amu.ensco.com>
Date: Tue, 26 Sep 2000 13:25:50 -0400
Sender: owner-s-news@wubios.wustl.edu
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

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