s_pauc: summarize paucs

Description Usage Arguments Examples

View source: R/s_pauc.R

Description

summarize paucs

Usage

1
2
3
s_pauc_(df, idv, dv, paucs, digits = Inf)

s_pauc(df, idv, dv, paucs, digits = Inf)

Arguments

df

data frame

idv

string name for time column for pauc slice

dv

string name for dependent variable column (eg. dv or cobs)

paucs

list of ranges for pauc calculation

digits

number of decimals to round result before returning

Examples

1
2
3
library(dplyr)
sd_oral_richpk  %>% group_by(ID) %>% s_pauc(Time, Conc, list(c(0,8), c(8, 24)))
sd_oral_richpk  %>% group_by(ID) %>% s_pauc_("Time", "Conc", list(c(0,8), c(8, 24)))

Example output

Attaching package: 'dplyr'

The following objects are masked from 'package:stats':

    filter, lag

The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union

# A tibble: 50 x 3
# Groups:   ID [50]
      ID pAUC0_8 pAUC8_24
   <int>   <dbl>    <dbl>
 1     1    204.    181. 
 2     2    523.    680. 
 3     3    316.    150. 
 4     4    564.    655. 
 5     5    302.    186. 
 6     6    154.    141. 
 7     7    393.    346. 
 8     8    255.    199. 
 9     9    286.    413. 
10    10    122.     39.6
# ... with 40 more rows
# A tibble: 50 x 3
# Groups:   ID [50]
      ID pAUC0_8 pAUC8_24
   <int>   <dbl>    <dbl>
 1     1    204.    181. 
 2     2    523.    680. 
 3     3    316.    150. 
 4     4    564.    655. 
 5     5    302.    186. 
 6     6    154.    141. 
 7     7    393.    346. 
 8     8    255.    199. 
 9     9    286.    413. 
10    10    122.     39.6
# ... with 40 more rows

PKPDmisc documentation built on April 14, 2020, 5:49 p.m.