summarize paucs

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

library(dplyr) sd_oral_richpk %>% group_by(ID) %>% s_pauc(Time, Conc, list(c(0,8), c(8, 24)))
#> # A tibble: 50 x 3 #> # Groups: ID [?] #> 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
sd_oral_richpk %>% group_by(ID) %>% s_pauc_("Time", "Conc", list(c(0,8), c(8, 24)))
#> # A tibble: 50 x 3 #> # Groups: ID [?] #> 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