Have a look at rbind.fill() in the reshape library.
This will return a data.frame not a matrix but you can
always convert it to a matrix.
--- zhihuali <[EMAIL PROTECTED]> wrote:
>
> Hi netters,
> Suppose I have two data frames X and Y. X has three
> colnames A, B and C. Y has three colnames A,
On 26/01/2008, David Winsemius <[EMAIL PROTECTED]> wrote:
> "Henrique Dallazuanna" <[EMAIL PROTECTED]> wrote in
> news:[EMAIL PROTECTED]:
>
> > Try this:
> > merge(x, y, all=T)
>
> That will give 's in the non-matching rows, which may be what the
> OP wanted. If, on the otherhand, only the rows wit
"Henrique Dallazuanna" <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> Try this:
> merge(x, y, all=T)
That will give 's in the non-matching rows, which may be what the
OP wanted. If, on the otherhand, only the rows with matches were
desired, the usage might be:
A.B <- merge(X, Y, by =
Hi, Huali,
there is another way to do so
library(sqldf)
wanted <- sqldf("select * from X inner join Y on X.A = Y.A and X.B = Y.A")
2008/1/26 zhihuali <[EMAIL PROTECTED]>:
>
> Hi netters,
> Suppose I have two data frames X and Y. X has three colnames A, B and C. Y
> has three colnames A,B and D.
Try this:
merge(x, y, all=T)
On 26/01/2008, zhihuali <[EMAIL PROTECTED]> wrote:
>
> Hi netters,
> Suppose I have two data frames X and Y. X has three colnames A, B and C. Y
> has three colnames A,B and D.
>
> I want to combine them into one matrix, joining the rows having the same A
> and B va
Hi netters,
Suppose I have two data frames X and Y. X has three colnames A, B and C. Y has
three colnames A,B and D.
I want to combine them into one matrix, joining the rows having the same A and
B values (X$A==Y$A and X$B = Y$B). So the resulting dataframe has four
variables/columns: A,B,C an
6 matches
Mail list logo