Displaying 1 result from an estimated 1 matches for "ticker1".
Did you mean:
ticker
2008 Sep 05
1
casting help please
...("A",5),rep("B",6)), date=c(1:5, 1:6),
value=c(NA,100*exp(rnorm(10,0,.1)))))
> cast(x, date ~ ticker) # this does what I want with toy data
But when I use my real data frame
> str(prices)
'data.frame': 308188 obs. of 3 variables:
$ Ticker: chr "ticker1" " ticker1" " ticker1" " ticker1" ...
$ Date :Class 'Date' num [1:308188] 12296 12297 12298 12299 12300
...
$ Price : num NA NA NA NA NA NA NA NA NA NA ...
I get
> prices.wide <- cast(prices, Date ~ Ticker, add.missing=TRUE)
Error...