Hi,
I have a history dataset, a matrix with about 1590 obs, and 242 cols,
and I need to update this matrix with an 'update' matrix that has about
30 rows, and roughly similar number of columns as the history ds (but
not necessarily equal). The update dataset is read from an Excel ODBC
connection.
Take a look at the help for merge(): in all the examples by.x is a
character string, not a one-column data frame which is what
rhistory[Date] would appear to be.
Please note the trailer of this messsage.
On Tue, 5 Jun 2007, Patnaik, Tirthankar wrote:
Hi,
I have a history dataset, a matrix
Subject: Re: [R] Problems with Merge
Take a look at the help for merge(): in all the examples by.x
is a character string, not a one-column data frame which is
what rhistory[Date] would appear to be.
Please note the trailer of this messsage.
On Tue, 5 Jun 2007, Patnaik, Tirthankar wrote
At 10:44 AM +0530 10/6/04, Vikas Rawal wrote:
This issue has been discussed on this list before but the solutions
offerred are not satisfactory. So I thought I shall raise it again.
I want to merge two datasets which have three common variables.
These variables DO NOT have the same names in
Hello,
You can change e.g. the second column name in the following way:
data(iris)
colnames(iris)
[1] Sepal.Length Sepal.Width Petal.Length Petal.Width
Species
To change the second column name:
colnames(iris)[2] - name
colnames(iris)
[1] Sepal.Length name Petal.Length Petal.Width
Hello!
merge(TablePatient, TableSpecial, by.x=ID,
by.y=PATIENTID)
works fine for me. (There is also a variable ID in
TableSpecial).
One problem - or what has to be known - is that merge
is using the levels, not the labels, if the merged
variables are factors.
Karl
On Wed, 6 Oct 2004, Vikas Rawal wrote:
The problem is that R allows you to use by.x and by.y variables to specify
only one variable in x dataset and one variable in y dataset to merge.
This turns out not to be the case.
names(df)
[1] x y z
names(df2)
[1] a b c
This issue has been discussed on this list before but the solutions
offerred are not satisfactory. So I thought I shall raise it again.
I want to merge two datasets which have three common variables. These
variables DO NOT have the same names in both the files. In addition,
there are two