R package for implementation of trio classes