> I like to re-arrange a table (sTable) based on the value of one the rows
> (Analyte) as shown below. Blocks of data with different values for Analyte
> need to be stacked below each other. Any easy way to do this or any advice
> where to look?

How about:

library(reshape)
dfm <- melt(df, m="AUC")

cast(dfm, Analyte + result_variable ~ Dose, myStats)

# A few other variations
cast(dfm, Analyte ~ Dose ~ result_variable, myStats)
cast(dfm, Analyte + Dose ~ result_variable, myStats)

# See http://had.co.nz/reshape for more documentation

Hadley

______________________________________________
[email protected] 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