Displaying 20 results from an estimated 10000 matches similar to: "merge two data sets"
2008 Jun 04
4
merging 3 data sets at once
Hi All,
I am looking into merging 3 data sets I know how to do that by merging data1
with data2 and then merging the result with data 3. I was wondering if it
can be done all at once so I tried,
M<-merge(data1,data2,data3, by=?ID?)
It does not work!
Any ideas?
--
View this message in context: http://www.nabble.com/merging-3-data-sets-at-once-tp17658873p17658873.html
Sent from the R help
2008 Jun 02
2
merging two data sets with no column header
I have two data sets data1 and data2 with no column names( No header). The
first coluimn in both data sets represents the case ID. How can I tell R to
merge the two data sets by the case ID if there is no header? Also, In data1
I have more cases and I would like the result of the merge to have all the
cases in both data1 and data2. there may be some duplicate cases.
I appreciate if someone can
2008 Aug 21
1
problem merging two data sets ( one with a header and one without)
I have two set of data, Data1 and Data2 . Data1 has a header and Data2 does
not. I would like to merge the two data sets after removing some columns
from data2 .
I am having a problem merging so I had to write and read final data and
specify the ?header=F? so the merge can be done by?V1?. Is there a way to
avoid this step. The problem is when I do cbind the FinalData has different
column names
2008 Aug 22
1
problem with rbind
I am trying to use rbind to have the two data on the top of each other but I
am getting an extra X on the column header and the rows are numberd , How to
get rid of this problem? I appreciate your help
x1<- read.table(file="data1.txt", header=T, sep="\t")
x2<-read.table(file="data2.txt", header=T, sep="\t")
y<-rbind(x1,x2)
> y
X0
2008 Jun 05
1
problems with reading the data and merge
I have a problem with reading a file data.txt that has a header
Each row has the individual ID and then some data that are letter and
numbers such as 00
If I read the file as
data<-read.table("data.txt",sep='\t', header=T)
write.table(data,file="data1.txt", sep='\t', quote=F, col.names=T,
row.names=F)
data1.txt looks different than data.txt. In
2009 Nov 06
1
probem on merge data
Hi there,
data1<-matrix(data=c(1,1.2,1.3,"3/23/2004",1,1.5,2.3,"3/22/2004",2,0.2,3.3,"4/23/2004",3,1.5,1.3,"5/22/2004"),nrow=4,ncol=4,byrow=TRUE)
data1<-data.frame(data1)
names(data1)<-c("areaid","x","y","date")
data1
areaid x y date
1 1 1.2 1.3 3/23/2004
2 1 1.5 2.3 3/22/2004
3 2
2011 Oct 07
2
Merge dataframes
Hello,
I am having some problems to use the 'merge' function. I'm not sure if I got
its working right.
What I want to do is:
1) Suppose I have a dataframe like:
height width
1 1.1 2.3
2 2.1 2.5
3 1.8 1.9
4 1.6 2.1
5 1.8 2.4
2) And I generate a second
2009 Feb 26
2
Merge question
Hi:
I am a new R user. I have the following question and would appreciate your input
Data1 (data frame 1)
p1,d1,d2 (p1 is text and d1 and d2 are numeric)
xyz,10,25
Data2 (data frame 2)
p1,d1,d2
xyz,11,15
Now I want to create a new data frame that looks like so below. The fields d1 and s2 are summed by the product key.
Data3
p1,d1,d2
xyz,21 (sum of 10 from Data1 and 11 from Data2),40 (sum of 25
2009 Aug 18
1
function merge()
Hi,
Actually, i use the function merge like this:
(Data1 <- Data1[1:7,1:3])
Policy.Number AXA.Entity Country
1 1060000077 BNL BNL
2 4001023 CH BNL
3 1060000006 UK BNL
4 4001025 CH BNL
5 6.00E+13 USA BNL
6 6100001 UK BNL
7 4001028 USA BNL
> Data2 <-
2005 Feb 16
5
scaling axes when plotting multiple data sets
1) When adding additional data sets to a plot using "plot" followed by "lines",
is there a way to automate the scaling of the axes to allow for all data sets
to fit within the plot area?
2) I attempted to solve this by setting
xlim=c(min(c(data1,data2,data3)),max(c(data1,data2,data3)))
however, there are some NAs and Infs in these data sets, and min(data1) and
max(data1) both
2010 Jan 27
2
Merge: sort=F not preserving order?
Hello,
I have the following data1 (index are chars):
?? ?index
1 ?008823
2 ?012689
3 ?004503
4 ?002991
5 ?012689
6 ?002845
7 ?012689
8 ?012395
9 ?012689
10 009302
11 002845
12 006669
13 008823
14 009302
15 025340
16 012689
and data2 in this format (index2 are chars):
?? ? ? index2 ? ? ?tic
1 ? ? 001003 ? ? ANTQ
2 ? ? 001004 ? ? AIR
3 ? ? 001009 ? ? ABSI
4 ? ? 001011 ? ? ACSE
etc
I am
2013 Jan 16
1
function approx interpolation of time series data sets
Readers,
Am trying to use the function 'approx' to interpolate time series data sets:
data1:
01:23:40 5
01:23:45 10
01:23:50 12
01:23:55 7
data2:
01:23:42
01:23:47
01:23:51
01:23:54
The objective is to obtain interpolated values of 'data1' column 2 (5,
10, 12, 7) for the times shown in data2. Tried the following command
but received the error shown:
2008 Oct 08
1
Lattice question: plotting two sets of data, defining groups for the second set
R friends,
I'm running R 2.7.2 on Windows XP SP2.
I have some data that's amenable to smoothing, and some that's not. I'm
trying to plot smoothed lines for the former along with just points for the
latter in a single panel. The problem comes when trying to break out the
points by group. My sample code follows.
data1 <-
2011 Feb 11
1
Using merge
Hi,
I have two tables and I need to merge both. I use the merge command, but
in this way the name must be exactly. How I can make to compare
independently of upper or lower-case?
Look:
data1<-data.frame(journal=c("Ecology","Environmental
Entomology","Neotropical Biology And Conservation"))
2006 Feb 22
2
Merging data
Hello all,
I am fairly new to R and am trying to bring together data from multiple sources. Here is one problem that I cannot seem to crack – I hope somebody can help. Let me simplify the problem: Let’s say I have two datasets: DATA1 and DATA2. I would like to work with all the cases in DATA2. I have additional variables on these cases in DATA1, which is a larger data set with many
2012 Jan 17
1
arguments in merge() not accepted
dear r-listers,
this may be some rally stupid mistake, but googling didn't help me any further:
> merge(data1, data2, all.x=T)
gives back:
:?Error in merge(data1, data2, all.x = T) :
: unused argument(s) (all.x = T)
[same with any other argument i try to put in..]
although the man page states
>merge(x, y, by = intersect(names(x), names(y)),
> by.x = by, by.y = by, all =
2010 Sep 06
1
combining collumns for data.frames
Hi
This question is far less simple than the title suggests, please read carefully, thanks.
I have 2 sets of data, both read into R
>data1<-read.table ("1.txt", header=T, sep="\t")
>data2<-read.table ("2.txt", header=T, sep="\t")
>data1
Taxon stage1 stage2 stage3 stage4
T1 0 0 1 1
T2 0
2011 Nov 16
3
plotting a double y axis when x and y lengths differ
Hello All,
Many thanks to the help I have received so far.
Here is an example data set I hope to plot
Data1
Year Data SE
1 2005 2 0.01
2 2006 4 0.01
3 2007 5 0.01
4 2008 2 0.01
5 2009 3 0.01
6 2010 6 0.01
Data2
Year Data SE
1 2006 32 1
2 2007 100 2
3 2008 60 4
4 2009 67 3
5 2010 8 1
Notice Data2 has one less years worth of data than Data1 (which is my
2002 Dec 05
1
Passing options as lists
Hi,
I apologize if this has previously been posted. I've just subscribed to the
R-help digest.
I'm writing a plotting function that uses layout() to plot several different
plots on the same device. This function uses plot(), image(), and a custom
function that uses text(). Each cell of the layout needs different par()
parameters, so what I'd like to do is pass them as lists:
2008 Nov 04
1
fuse_setlk_cbk error
I'm building a two node cluster to run vserver systems on. I've setup
glusterfs with this config:
# node a
volume data-posix
type storage/posix
option directory /export/cluster
end-volume
volume data1
type features/posix-locks
subvolumes data-posix
end-volume
volume data2
type protocol/client
option transport-type tcp/client
option remote-host