Hi,
Sorry, in my previous reply, I omitted one of the columns.
Lines1 <- readLines(textConnection("Date:10.09.19 Time:21:39:05 Lat:N62.37.18
Long:E018.07.32
-0010 | 28| 28
0010-0020| 302| 302
0020-0030| 42| 42
0030-0040| 2| 2
0040-0050| 1| 1
0060-0070| 1| 1
_
Date
Hi,
Lines1 <- readLines(textConnection("Date:10.09.19 Time:21:39:05 Lat:N62.37.18
Long:E018.07.32
-0010 | 28| 28
0010-0020| 302| 302
0020-0030| 42| 42
0030-0040| 2| 2
0040-0050| 1| 1
0060-0070| 1| 1
_
Date:10.09.19 Time:21:44:52 Lat:N62.38.00 Long:E018.09.07
On Feb 12, 2013, at 2:56 AM, Niklas Larson wrote:
> Hi R users,
> Wonder if somebody could give me help on how to reshape this type of data:
>
#Adding a bit of code to read this into R:
Lines <- readLines(textConnection("Date:10.09.19 Time:21:39:05 Lat:N62.37.18
Long:E018.07.32
-0010 | 2
Hi:
On Fri, Jul 15, 2011 at 6:04 AM, anglor wrote:
> Hi, thanks for your reply.
>
> I didn't get cast() to work and didn't know how to find information about it
> either.
Hadley Wickham's home page http://had.co.nz/ has a link (last one
under the heading 'R Packages') to the reshape package pag
Thank you!
I used this one and it worked really great.
/Angelica
--
View this message in context:
http://r.789695.n4.nabble.com/Reorganize-data-fram-tp3662123p3669782.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project
Hi, thanks for your reply.
I didn't get cast() to work and didn't know how to find information about it
either. I used reshape but then I had to subset only those columns (actually
I have 28 columns of other data) Could cast or reshape work also with more
columns?
Angelica
--
View this messag
Hi:
Try the cast() function in the reshape package. Using d as the name of
your data frame,
library(reshape)
cast(d, Date ~ Category, value = 'Temperature')
Date A B C
1 2007102 16 17 18
HTH,
Dennis
On Tue, Jul 12, 2011 at 5:42 AM, anglor wrote:
> Hi,
>
> I have a data frame of about
On Jul 12, 2011, at 8:42 AM, anglor wrote:
Hi,
I have a data frame of about 700 000 rows which look something like
this:
DateTemperature Category
2007102 16 A
2007102 17 B
2007102 18 C
but need it to be:
Date T
require(reshape2)
dcast(stock.returns, Date ~ Ticker)
The numbers were changed from their original values, but if you originally
created the values Return as.numeric they should stay the same
On Wednesday, March 16, 2011 at 9:37 AM, chris99 wrote:
Hi group,
>
> I am trying to convert the organi
Try this:
xtabs(Return ~ Date + Ticker, stock.returns)
On Wed, Mar 16, 2011 at 11:37 AM, chris99 wrote:
> Hi group,
>
> I am trying to convert the organization of a data frame so I can do some
> correlations between stocks,
>
> I have something like this:
>
> stock.returns <-
> data.frame(rbind(
Here's one way:
ans = reshape(stock.returns,idvar='Date',
+varying=list(names(stock.returns)[-1]),
+direction='long',
+times=names(stock.returns)[-1],
+v.names='Return',timevar='Ticker')
rownames(ans) = NULL
ans
Date Ticke
11 matches
Mail list logo