1 Dec 2010 01:04
Re: Can't Destroy Dim Names
clangkamp <christian.langkamp <at> gmxpro.de>
2010-12-01 00:04:34 GMT
2010-12-01 00:04:34 GMT
Dear David
To confirm, your method worked. I am not allowed to divulge the original
data (financial data), but here comes another set.
Test_DF<-data.frame(Figure=c("A","B","A","B"), Code=c("C", "C", "D", "D"),
No=c(1,2,3.5,4))
?data.frame
View(Test_DF)
str(Test_DF)
Test_DF_m<-melt(Test_DF, measure="No")
View(Test_DF_m)
Test_DF_c<-cast(Test_DF_m, Figure~Code)
str(Test_DF_c)
Basically, after the casting the variables the naming appears. If one then
goes forth with this item, and does some operations on them (in my case with
the zoo package), and ends up with the same cube, but just chr as row/column
names but actually the same ones and then tries to merge them (abind). The
set above doesn't replicate strangely everything my set does, ind adds a lot
more attributes even though I go through the same commands.
So the bottom line is where I would expect a simple 2 by 2 matrix with row
and column names after the melt and cast, it is a much more complex object
and I think tearing off all the rest might be a good thing before
proceeding. This is the background to the question.
-----
Christian Langkamp
christian.langkamp-at-gmxpro.de
(Continue reading)
RSS Feed