s-news
[Top] [All Lists]

duplicate names addressing

To: "'S-news@wubios.wustl.edu'" <S-news@wubios.wustl.edu>
Subject: duplicate names addressing
From: Stafford Phillip-APS095 <phillip.stafford@motorola.com>
Date: Fri, 21 Dec 2001 10:01:52 -0600
Hello S newsgroup;

This question should probably go directly to Nick Ellis but here goes:

I'm using S+2000 on Windows 2000 with 2G RAM and an old Intel 933 (anyone want 
to trade for an 1800?).

duplicated() returns a logical vector that tells whether an element in X has 
ever appeared BEFORE in X (the first occurance of a duplicated element is not 
reported) but is there a way to get it to return a logical vector for the FIRST 
and all SUBSEQUENT times it comes across an element that is duplicated?

Also, this is a simple one but I've had some difficulty:  What's the 
simplest/shortest way to subset a data.frame using a column of characters 
located somewhere in the middle of the data.frame against another data.frame, 
matching column of characters against a column of characters.  I have a clunky 
way of doing it but I'd like to know the simplest/most generic and fastest way. 
 It's easy with row.names but when that's not an option.....  

Also, how to handle duplicated names either in the subset target or in the 
subset key?  I've heard of dup.names.OK for row.names but I've never seen this 
function - it sounds intriguing but dangerous.  I am forced to use duplicated 
names and I need to search on those - I've used unstack successfully to move 
the duplicated names around but I still need to maintain the duplicates.


Thanks for the advice;

Phillip Stafford



<Prev in Thread] Current Thread [Next in Thread>
  • duplicate names addressing, Stafford Phillip-APS095 <=