Date: October 19, 2007 8:29:27 AM PDT
Subject: Re: [S] Splus returns NULL
Actually R returns NULL as well, it merely
does so invisibly. So if you are happy with
what R does, you can do:
if(!X) cat("hello") else invisible()
Patrick Burns
+44 (0)20 8525 0696
(home of S Poetry and "A Guide for the Unwilling S User")
Dennis Fisher wrote:
Colleagues
This is probably remarkably simple but I cannot find the answer. When a conditional statement tests as negative, Splus (version 7.0.0 running on RedHat Linux) returns NULL.
for example:
X <- T
if (!X) cat("hello")
returns NULL. I have tested options(warn=-1) and options(echo=F) to no avail. In R, the same commands return nothing.
Any ideas how to prevent the NULL returns?
Dennis
Dennis Fisher MD
P < (The "P Less Than" Company)
Phone: 1-866-PLessThan (1-866-753-7784)
Fax: 1-415-564-2220
www.PLessThan.com