| To: | Jason.Overstreet@honeywell.com |
|---|---|
| Subject: | Re: Sub setting data |
| From: | Rolf Turner <rolf@math.unb.ca> |
| Date: | Fri, 16 Sep 2005 17:35:57 -0300 (ADT) |
| Cc: | s-news@lists.biostat.wustl.edu |
s1 <- df1$ser.no
s2 <- df2$ser.no
ii <- match(s2,s1)
df.new <- df1[ii,]
cheers,
Rolf Turner
rolf@math.unb.ca
Original message:
> I have a list of several hundred observations in one data frame that
> has several dozen variables. In a second data frame, I have a subset
> of the first data frame containing only the serial number (primary
> key) of the first data frame. I want to build a data frame that has
> all the variables in the first data frame, but only for the
> observations that are listed in the second data frame. Thanks in
> advance for any help.
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Sub setting data, Overstreet, Jason (FL51) |
|---|---|
| Next by Date: | Re: Sub setting data, Stewart, William |
| Previous by Thread: | Sub setting data, Overstreet, Jason (FL51) |
| Next by Thread: | Re: Sub setting data, Stewart, William |
| Indexes: | [Date] [Thread] [Top] [All Lists] |