View source: R/morph_aggregate.R
morph_aggregate | R Documentation |
Aggregate matrices of distances by types, calculating mean distances for each single types (eg., two eyes on a single face decoration) or for the whole decoration (faces, eyes, mouths, ...)
morph_aggregate(
nodes = NULL,
ldist = NULL,
aggr = c("type", "decoration"),
dataDir = system.file("extdata", package = "iconr"),
out.dir = "_out"
)
nodes |
Nodes dataframe coming from the 'conv_shp_to_wkt.R' function |
ldist |
A list of distance matrices coming from 'morph_nds_compar(nodes, focus = "dist")' |
aggr |
Aggregate on GUs' types by decorations ("type") or aggregate by decorations ("decoration"). |
dataDir |
path to the folder. |
out.dir |
Path of the output folder. By default "_out/" in the "dataDir" folder |
Create plots depending on the list of matrices.
dataDir <- system.file("extdata", package = "iconr")
nd.df.path <- conv_shp_to_wkt(dataDir = dataDir)
nodes <- read.csv(nd.df.path, sep = ";")
conv_wkt_to_jpg(nodes = nodes)
morph_nds_compar(nodes, focus = c("panel"))
ldist <- morph_nds_compar(nodes, focus = c("dist"))
morph_aggregate(nodes = nodes, ldist = ldist, aggr = "type")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.