Hi,
You can try ?merge() or ?join() from library(plyr)
merge(tempr, pr, by="date",all=TRUE)
A.K.
Hi, all!
I have a problem. I have 2 data frame. Each contains column: "date" and one
unique column (temperature and pressure correspondingly). But dates are not a
same. First one since 1st Jan 20
?rbind
HTH,
Jorge.-
On Mon, Jul 16, 2012 at 1:17 PM, Lauren Vogric <> wrote:
> I have 2 data tables. Each hold information categorized into "Date" and
> "Price." What I need to do is combine the two to get 2 columns of "Date"
> and "Price," by continuing the table downwards with the new rows su
?rbind
On Mon, Jul 16, 2012 at 1:17 PM, Lauren Vogric
wrote:
> I have 2 data tables. Each hold information categorized into "Date" and
> "Price." What I need to do is combine the two to get 2 columns of "Date" and
> "Price," by continuing the table downwards with the new rows supplied from
> t
I have 2 data tables. Each hold information categorized into "Date" and
"Price." What I need to do is combine the two to get 2 columns of "Date" and
"Price," by continuing the table downwards with the new rows supplied from the
second table. So, for example I have
5/1/12 2
5/2/12 5
As data tab
With Jim's help, the solution is as follows...
-Original Message-
From: jim holtman [mailto:jholtman * at sign * gmail.com]
Sent: Sunday, January 31, 2010 5:41 PM
To: Euan Reavie
Subject: Re: [R] combining data frames in a list - how do I add breaks?
Your 'combined' w
I have several questions on your goals.
Why are you planning to post-processing outside of R?
Why use CSV files when there are usually better ways to maintain
the structure of the data?
Why do you want to flatten your tables? It looks like a three-dimensional array
would better capture the info
How about posting your complete set of code that is manipulating the
list. Normally when I am using a list, each list element is the
result from a test/iteration and then I can use something like 'rbind'
at the end. I would not expect the output you are getting with the
results extending to the r
I'm a week-old R user, and have become stuck trying to create usable CSV
outputs for post-processing. I am using the package Rioja, which provides
small datasets of results. I am running several analyses in a loop and
iteratively adding the results to a *list* ("combined"). Within each
iteration I
stephen sefick wrote:
> I have two dataframes in R that were tab seperated .txt files
>
> y<-read.table("foo.txt", header=T)
> x<-read.table("foo.txt", header=T)
>
> these are set up like this:
>
> Datetime Temp
> 01/01/07 00:01 11.5
> 01/01/07 00:16 11.6
>
> e
You could do it with zoo:
DF1 <- data.frame(Datetime = ISOdate(2000, 1:2, 1), Temp = 1:2)
DF2 <- data.frame(Datetime = ISOdate(2000, 2:3, 1), Temp = 3:4)
library(zoo)
# convert to zoo
z1 <- zoo(DF1[,2], DF1[,1])
z2 <- zoo(DF2[,2], DF2[,1])
# merge
z <- merge(z1, z2, all = TRUE)
# take rowmeans
Try this:
x
Datetime Temp
1 01/01/07 00:01 11.5
2 01/01/07 00:16 11.6
y
Datetime Temp
1 01/01/07 00:01 10
2 01/01/07 00:163
merge(x, y, by="Datetime")
Datetime Temp.x Temp.y
1 01/01/07 00:01 11.5 10
2 01/01/07 00:16 11.6 3
On 22/02/2008, stephen sef
I have two dataframes in R that were tab seperated .txt files
y<-read.table("foo.txt", header=T)
x<-read.table("foo.txt", header=T)
these are set up like this:
Datetime Temp
01/01/07 00:01 11.5
01/01/07 00:16 11.6
etc etc to 66000 rows in y and 33000 rows in x
T
12 matches
Mail list logo