Skip to contents

Create a per-ID event summary for memory estimation

Usage

rxMemSummary(nobs, ndoses, id = seq_along(nobs))

Arguments

nobs

Integer vector of observation counts per ID.

ndoses

Integer vector of dose event counts per ID.

id

Integer or character vector of subject IDs (optional).

Value

A data.frame with class "rxMemSummary".

Examples


# Three subjects with known observation and dose counts
rxMemSummary(nobs = c(48L, 96L, 48L), ndoses = c(7L, 14L, 7L))
#>   id nobs ndoses
#> 1  1   48      7
#> 2  2   96     14
#> 3  3   48      7

# Explicit subject IDs
rxMemSummary(nobs = c(10L, 20L), ndoses = c(5L, 5L), id = c(101L, 102L))
#>    id nobs ndoses
#> 1 101   10      5
#> 2 102   20      5