Hi all.
I have a pure R programming question.
Having a data.frame with a 'data' variable and some (>1) ID variables
(either numeric or factors), I would extract a sequence of data values given
a sequence of ID values.

Here's an example. Build a dataset:
n1 <- 5
n2 <- 2
v1 <- rep(factor(1:n1),2)
v2 <- rep(1:n2,5)
x <- rnorm(10)
dat <- data.frame(x=x, v1=v1, v2=v2)

Now, for example, I should extract x values responding to some arbitrary
IDs:
(v1="2", v2=1), (v1="3", v2=2), (v1="4", v2=1).
For example, I should store those id sequences in a separate list (maybe an
indexing data.frame), but this really isn't the point.
The point is that I have somewhere a ready sequence of IDs from which
obtaining corresponding data.
Note that I don't know if some ID combination exists in the database.
Some suggestions on a good way to do this?

Tnx all,
Antonio, Fabio Di Narzo.

	[[alternative HTML version deleted]]


