s-news
[Top] [All Lists]

"matching problems"

To: "S-news" <s-news@lists.biostat.wustl.edu>
Subject: "matching problems"
From: "Fredrik Lundgren" <fredrik.lundgren@norrkoping.mail.telia.com>
Date: Sat, 22 Mar 2003 20:34:32 +0100
Hello,

I have a data.frame (ac.aaa) with lots of information of individual operated 
patients. The interesting ones here are "hospital" which is a factor and 
"op.year" which is an integer (length = 2436). In another data.frame (op.quot) 
I have "hospital2" again a factor and "year" again an integer together with 
information of "#operated / #arrived"  for each year and hospital  (length = 
416).

I try to match

match(c(ac.aaa$hospital, ac.aaa$op.year), c(op.quot$hospital, op.quot$year))

unfortunately this gives a vector of length = 4872 so I'm doing it wrong. It 
appears as if I fail to bind 'hospital and op.year' as well as 'hospital2 and 
year' so hospital are matched to hospital2 and op.year to year  and no matching 
the combination wich is what i want. See my problem?

There must be a way!
Please, help me


Sincerely Fredrik Lundgren


<Prev in Thread] Current Thread [Next in Thread>
  • "matching problems", Fredrik Lundgren <=