# NOT RUN {
library(reshape2)
library(dplyr)
data(pocmaj)
# melt data and summarise replicates
datatable <- pocmaj %>%
melt(id.vars=c("core", "depth"), variable.name="param") %>%
group_by(core, param, depth) %>%
summarise(sd=mean(value), value=mean(value)) %>%
rename.cols("depth"="x", "core"="location")
# create mudata object
md <- mudata(datatable)
summary(md)
plot(md, yvar="x", geom=c("path", "point"))
# }
Run the code above in your browser using DataLab