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.

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.