Hi,

After applying acast() I typically have to adjust the names of the array by 
hand. Is there any way to tell acast to do this automatically?

Cheers,

Marius

require(reshape2)
(df <- data.frame(a=c("a1","a2"), b=c("b1","b2"), c=c("c1","c2")))
a.df <- acast(df, a~b, value_var="c")
names(dimnames(a.df)) # => NULL; would be nice to get the following:
names(dimnames(a.df)) <- c("a", "b")
a.df

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to