PBImisc R package