formatPsi: Formats the output of 'psi'.

View source: R/formatPsi.R

formatPsiR Documentation

Formats the output of psi.

Description

Parses a list produced by psi to generate either a dataframe or a matrix. Can also format a psi matrix into a dataframe and viceversa.

Usage

formatPsi(
  psi.values = NULL,
  to = "dataframe")

Arguments

psi.values

list produced by psi.

to

character, either "dataframe" or "matrix".

Details

The function detects the type of input, and checks that it is different from the value of to. If that is the case, it throws a warning, and returns the input object. It uses the helper function .psiToDataframe, only intended for internal use.

Author(s)

Blas Benito <blasbenito@gmail.com>


BlasBenito/distantia documentation built on Nov. 17, 2023, 11:06 p.m.