[R] Reshaping data with xtabs reorders my rows
filip.bielejec at rega.kuleuven.be
filip.bielejec at rega.kuleuven.be
Wed Jun 15 10:46:39 CEST 2011
Dear,
I have a data frame melted from a list of matrices (melt from reshape
package), then I impute some missing values and then want to tabulate
the data again to the array (or list, doesn't matter) of matrices form.
However when using xtabs function it orders my rows alphabetically and
apparently doesn't take "reorder = FALSE" option or anything like it.
Is there anything I can do to stop it from doing so?
Relevant parts of code:
matrices.m <- melt(combined_list)
matrices.m_i[is.na(matrices.m_i$value),]$value <- predictions
matrices <- xtabs(value ~ location + variable + week, data =
matrices.m_i)
--
while(!succeed) { try(); }
More information about the R-help
mailing list