Hello, I have a data set where there are multiple "cycles" per "patient,"
and I want to exclude from my data set instances where a variable was not
measured every cycle. The difficulty is that the patients have different
cycles; some have cycles 1,2, and 3, others only have 1 and 3 (and
everything in between). Therefore, I'm having difficulty in in
distinguishing between the NA of not having the cycle, and the NA of not
having that particular measurement.

Here's a similar example of the data:

Patient, Cycle, Variable1, Variable 2
A, 1, 4, 5
A, 2, 3, 3
A, 3, 4, NA
B, 1, 6, 6
B, 2, NA, 6
C, 1, 6, 5
C, 3, 2, 2

So in this case, I would want all of Variable 1 for Patient B to be NA, and
all of Variable 2 for Patient A to be NA.

Does anyone have a good way of tackling this problem? I'm having issues
with trying to subset the data such that I can compare Cycles within the
patient's factor level.

Thanks!

	[[alternative HTML version deleted]]

