[R] R is not for Relational
R.E. Darnell
R.E.Darnell at newcastle.ac.uk
Wed Aug 4 10:24:19 CEST 1999
Russel Senior writes:
>One useful thing that subset() doesn't appear to do is joins. That is
>frequently what select statements are used for in SQL. There are
>three S-plus functions (at least, as documented in MASS 2ed) called
>merge, by and aggregate. The merge() function joins data frames, but
>is not implemented in R that I am aware of, at least as of 0.64.0.
I use match to merge data sets.
B$V2<-A$V2[match(B$V1,A$V1)]
is similar to
SELECT V1 V2
FROM A B
WHERE A.V1=B.V1
i'nit?
Ross Darnell
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list