getMGs: Access the medication groups of a CMA object.

View source: R/adherer.R

getMGsR Documentation

Access the medication groups of a CMA object.

Description

Retrieve the medication groups and the observations they refer to (if any).

Usage

getMGs(x)

Arguments

x

a CMA object.

Value

a list with two members:

  • defs A data.frame containing the names and definitions of the medication classes; please note that there is an extra class __ALL_OTHERS__ containing all the observations not selected by any of the explicitly given medication classes.

  • obs A logical matrix where the columns are the medication classes (the last being __ALL_OTHERS__), and the rows the observations in the x's data; element (i,j) is TRUE iff observation j was selected by medication class i.


AdhereR documentation built on July 5, 2022, 5:08 p.m.