Skip to contents

This function converts posteriors exported by Hmsc-HPC into an Hmsc object. It can either read the data directly from RDS files or convert it from JSON format if specified.

Usage

GetPosts(FilePath, FromJSON = FALSE)

Arguments

FilePath

A character string specifying the path to the RDS files containing the exported posteriors.

FromJSON

A logical flag indicating whether the loaded models should be converted from JSON format. Defaults to FALSE, meaning the data will be read directly from an RDS file without conversion.

Value

Depending on the FromJSON parameter, returns an Hmsc object either directly from the RDS file or after converting it from JSON format.

Author

Ahmed El-Gabbas