morph_aggregate: Resume geometry classes (POINTS, LINES, POLYGON) of GUs for...

View source: R/morph_aggregate.R

morph_aggregateR Documentation

Resume geometry classes (POINTS, LINES, POLYGON) of GUs for each object

Description

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, ...)

Usage

morph_aggregate(
  nodes = NULL,
  ldist = NULL,
  aggr = c("type", "decoration"),
  dataDir = system.file("extdata", package = "iconr"),
  out.dir = "_out"
)

Arguments

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

Value

Create plots depending on the list of matrices.

Examples


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")


zoometh/iconr documentation built on Nov. 9, 2023, 10:01 a.m.