Description Usage Arguments Value Examples
Create an object describing multi-parameter spatiotemporal data in the (mostly) universal data format. This format is a collection of tables as described below. For an example of data already in this format, see the kentvillegreenwood dataset.
1 2 3 4 |
data |
The data table, which is a molten data frame containing the columns (at least)
'dataset', 'location', 'x', 'param', and 'value'. The 'dataset' column can be omitted
if there is only one dataset contained in the object (its name can be specified by
passing the parameter |
locations |
The locations table, which is a data frame containing the columns (at least) 'datset', and 'location'. If omitted, it will be created automatically using all unique dataset/location combinations. |
params |
The params table, which is a data frame containing the columns (at least) 'datset', and 'param'. If omitted, it will be created automatically using all unique dataset/param combinations. |
datasets |
The datasets table, which is a data frame containing the column (at least) 'dataset'. If omitted, it will be generated automatically using all unique datasets. |
columns |
The columns table, which is a data frame containing the columns (at least) 'dataset', 'table', and 'column'. If omitted, it will be created automatically using all dataset/table/column combinations. |
dataset.id |
The dataset id to use if the datasets table is omitted. |
location.id |
The location id if the locations table is omitted. |
defactorize |
Pass |
validate |
Pass |
expand.tags |
Pass |
retype |
Pass |
A mudata
object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 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"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.