s-news
[Top] [All Lists]

[S] logical tests on factors and ordered factors

To: s-news@wubios.wustl.edu
Subject: [S] logical tests on factors and ordered factors
From: "Chris Evans" <C.Evans@sghms.ac.uk>
Date: Fri, 24 Apr 1998 09:54:26 +0100
Comments: Authenticated sender is <sgju101@mail.sghms.ac.uk>
Organization: St. George's Hospital Medical School
Sender: owner-s-news@wubios.wustl.edu
I'm sure I'm looking through the obvious here but how do I do logical 
tests or ordered factors?  

I want to extract a subset from a dataframe on the values of two
ordered factors in it.  I have tried things like:

subset <- results[power == 1 & cut.frac == .975]

(those levels of power and cut.frac do exist in results as 
confirmed by summary(results).  However, this is not working.  Well, 
it creates an empty dataframe of the same size and shape as results 
as far as I can see.  That turns up in the object browser but 
summary(subset) goes off in to never-never land and returns an error 
message:

Error in is.recursive(object) && !is.language(object):  User interrupt
requested. Dumped

when I hit the escape button.

I have a feeling that I need to do something special to get the 
logical comparisons working properly on those ordered factors but I 
can't see anything in the manuals or the blue book (pre factors and 
ordered factors?) to help me.

Platform is Windows, version is 4.0r3. Sorry if I'm asking the 
obvious.

Chris (first posting to S-news, very impressed by the input I'm 
seeing here)


Chris Evans, Senior Lecturer in Psychotherapy,
Locum Consultant to the
  Prudence Skynner Family Therapy Clinic,
St. George's Hospital Medical School, London University
C.Evans@sghms.ac.uk    http://psyctc.sghms.ac.uk/
-----------------------------------------------------------------------
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>