correlation: Creates an object that can be used to plot a correlation...

View source: R/correlation.R

correlationR Documentation

Creates an object that can be used to plot a correlation matrix

Description

Creates an object that can be used to plot a correlation matrix using plot.correlation.

Usage

correlation(map, state, name)

Arguments

map

A sfreemap object, result of sfreemap execution;

state

The character state that will be used to calculate The correlation;

name

A string to uniquely identify this mapping.

Details

Correlation matrix is useful to check if different methods implies on similar results. To if you run sfreemap with different parameters you can easily check the correlation of the outcomes by summing up objects created with this function and plottig it using plot.correlation.

This function returns an object that can handle the plus operator. See examples.

Value

An object of class correlation

Author(s)

Diego Pasqualin dpasqualin@inf.ufpr.br

See Also

sfreemap, plot.correlation

Examples

r1 <- sfreemap(sfreemap.corals.trees[[1]], sfreemap.corals.tips, parallel=FALSE)
r2 <- sfreemap(sfreemap.corals.trees[[1]], sfreemap.corals.tips, method='mcmc',
                   n_simulation=1, parallel=FALSE)

cor <- correlation(r1, 'colonial', 'empirical') + correlation(r2, 'colonial', 'mcmc')
plot(cor)

dpasqualin/sfreemapc documentation built on July 5, 2023, 10:52 a.m.