Skip to content

casting help please

3 messages · davidr at rhotrading.com, Hadley Wickham

#
Hi David,

Does getting rid of the missings help?

prices <- prices[complete.cases(prices), ]

Also, you shouldn't need  add.missing=TRUE - what are you trying to do?

Hadley
On Fri, Sep 5, 2008 at 12:12 PM, <davidr at rhotrading.com> wrote:

  
    
#
I think I just remembered that in a melted data.frame the values have to
be called 'value' and tried renaming my third column so. Now it works
(without add.missing).

Thanks for this powerful piece of software!
-- David
(I was trying to convert a set of data in 'long' format to 'wide'
format. Basically I have a pretty long price history for many tickers
basically stacked up as indicated in the toy example and want them
reshaped with each ticker in a column with dates in the first column.
Maybe cast was not the best tool? But it works now.)

-----Original Message-----
From: hadley wickham [mailto:h.wickham at gmail.com] 
Sent: Friday, September 05, 2008 1:10 PM
To: David Reiner <davidr at rhotrading.com>
Cc: r-help at r-project.org
Subject: [SPAM] - Re: [R] casting help please - Found word(s) list error
in the Text body

Hi David,

Does getting rid of the missings help?

prices <- prices[complete.cases(prices), ]

Also, you shouldn't need  add.missing=TRUE - what are you trying to do?

Hadley
On Fri, Sep 5, 2008 at 12:12 PM, <davidr at rhotrading.com> wrote:
tickers
http://www.R-project.org/posting-guide.html