[R] subsets
Den
d.kazakiewicz at gmail.com
Thu Jan 20 09:53:01 CET 2011
Dear R people
Could you please help.
Basically, there are two variables in my data set. Each patient ('id')
may have one or more diseases ('diagnosis'). It looks like
id diagnosis
1 ah
2 ah
2 ihd
2 im
3 ah
3 stroke
4 ah
4 ihd
4 angina
5 ihd
..............
Q: How to make three data sets:
1. Patients with ah and ihd
2. Patients with ah but no ihd
3. Patients with ihd but no ah?
If you have any ideas could just guide what should I look for. Is a
subset or aggregate, or loops, or something else??? I am a bit lost. (F1
F1 F1 !!!:)
Thank you
More information about the R-help
mailing list