Skip to content
Prev 77478 / 398502 Next

Change in behavior of compare statement

On 9/19/2005 12:25 PM, Tomas Andersson wrote:
What is this function m_workspace.session.eval?  It's not a base 
function.  Perhaps its definition has changed?
s != "1" is perfectly valid R code.  It will evaluate to TRUE in at 
least the following case:

as.character(s) is not an NA, but isn't "1".

s != "True" will evaluate to TRUE in most cases, unless s happens to 
contain that exact string.
The syntax is fine, but it looks like a behaviour change in that 
function m_workspace.session.eval.  You'll need to ask the author of 
that function what is happening.

Duncan Murdoch