Abstract
Caffeine is a naturally-occurring central nervous system stimulant found in plant constituents including coffee, cocoa beans, and tea leaves. Consumption of caffeine through imbibing caffeinated drinks is rapidly growing among children, adolescents, and young adults, who tend to be more caffeine-sensitive than the rest of the general public; consequently, caffeine-related toxicities among these groups are also growing in number. However, a quantitative and interactive tool for predicting the plasma caffeine concentration that may lead to caffeine intoxication has yet to be developed. Using the previously established population-pharmacokinetic model, we developed “caffsim” R package and its web-based applications using Shiny and EDISON (EDucation-research Integration through Simulation On the Net). The primary aim of the software is to easily predict and calculate plasma caffeine concentration and pharmacokinetic parameters and visualize their changes after single or multiple ingestions of caffeine. The caffsim R package helps understand how plasma caffeine concentration changes over time and how long toxic concentration of caffeine can last in caffeine-sensitive groups. It may also help clinical evaluation of relationship between caffeine intake and toxicities when suspicious acute symptoms occur.
Keywords: caffeine, pharmacokinetics, R package
Introduction
Caffeine is a naturally occurring mild central nervous system stimulant that is found in plant constituents such as coffee, cocoa beans, and tea leaves. Caffeine has a long history of human consumption, and is currently used worldwide for enhancing wakefulness, relieving fatigue, and improving mental concentration. Generally, consumption of 400 mg of caffeine per day is safe for healthy adults, which is approximately the amount of caffeine in four cups of brewed coffee, 10 cans of cola, or two caffeinated drinks.[1] Although typical caffeine use is safe for healthy adults, its effects can be significantly different in caffeine-sensitive groups such as low-weight people including children and adolescents, and the consumption of caffeinated drinks is rapidly growing in these groups.[2] Consequently, caffeine-related toxicities are growing in number as well[3]; effects of caffeine intoxication include hallucinations, seizures, metabolic acidosis, rhabdomyolysis, and arrhythmias.[4] and several reports have associated caffeinated-drink ingestion with serious caffeine intoxication.[5,6] In most of cases of emergency room visits related to caffeine intoxication, the patients present with tachyarrhythmia and involves consumption of extremely high doses of caffeine (> 3 mg/kg).[3] Recently, a series of investigations of high caffeine exposure in adolescents revealed behavioral consequences including sleep-pattern change.[7,8]
To better explain the relationship between caffeine and its toxicities, a population-pharmacokinetic model was previously established, and Monte Carlo simulations successfully predicted maximal plasma caffeine-concentration profiles after ingestion of a single caffeinated drink.[9,10,11] It enables researchers to explore the permissible dose range of caffeine, especially for those who are vulnerable to caffeine overdose. However, a quantitative and interactive tool for predicting and simulating plasma caffeine concentration leading to caffeine intoxication has yet to be developed.
Using the previously established population-pharmacokinetic model and its parameters.[11] we developed “caffsim” R package and its web-based applications using Shiny and EDISON (EDucation-research Integration through Simulation On the Net, https://www.edison.re.kr/). The primary aim of the software is allowing for easy prediction of plasma caffeine concentration and visualizing its changes after single or multiple ingestions of caffeine.
Methods
Pharmacokinetic model of caffeine
A population-pharmacokinetic analysis was previously established based on a study of 30 healthy adult male volunteers of South Asian and European ancestry.[9,10] and Lee et al.[11] further investigated the model using Monte Carlo simulations to predict Cmax and AUC of caffeine in children.One-compartment model with first-order absorption kinetics and first-order elimination kinetics was shown to be well-fitted to the pharmacokinetic data, and the final pharmacokinetic parameters were adopted from the previous study[11] for development of the package.
Caffsim R package
Caffsim was developed in the open-source R programming language in order to allow contribution from anyone interested in the study (https://github.com/asancpt/caffsim). It is freely available for download on the CRAN repository (https://CRAN.R-project.org/package=caffsim), and the installation can be carried out by typing in the R console. The package utilizes data manipulation or visualization packages such as dplyr, tidyr, ggplot2[12] and Shiny. Contents of the caffsim R package can be broadly categorized into three main functions—single dosing simulations, multiple dosing simulations, and the other functions including descriptive statistics of pharmacokinetic parameters and a duration of toxic concentration, and execution of Shiny application (Table 1). Detailed documentation and examples for each function can be found on the online user manual on the CRAN repository, a package website (https://asancpt.github.io/caffsim) or directly within the R console by entering ?function ( and ) after the installation.
Table 1. Explanation on the functions in the caffsim R package.
Class | Functions | Description |
---|---|---|
Single dose | caffConcTime | Create a concentration-time dataset of single oral dosing of caffeine. |
Usage in R: caffConcTime(Weight = 20, Dose = 200, N = 20) | ||
caffPkparam | Create a dataset of pharmacokinetic parameters of single oral dosing of caffeine. | |
Usage in R: caffPkparam(Weight = 20, Dose = 200, N = 20) | ||
caffPlot | Plot plasma concentration-time curves of single oral dosing of caffeine. | |
Usage in R: caffPlot(caffConcTime(Weight = 20, Dose = 200, N = 20)) | ||
Mulitple doses | caffConcTimeMulti | Create a concentration-time dataset of multiple oral dosing of caffeine. |
Usage in R: caffConcTimeMulti(Weight = 20, Dose = 200, N = 20, Tau = 8, Repeat = 4) | ||
caffPkparamMulti | Create a dataset of pharmacokinetic parameters of multiple oral dosing of caffeine. | |
Usage in R: caffPkparamMulti(Weight = 20, Dose = 200, N = 20, Tau = 8) | ||
caffPlotMulti | Plot plasma concentration-time curves of multiple oral dosing of caffeine. | |
Usage in R: caffPlotMulti(caffConcTimeMulti(Weight = 20, Dose = 200, N = 20, Tau = 8, Repeat = 4)) | ||
Others | caffDescstat | Calculate descriptive statistics of simulated pharmacokinetic parameters. |
Usage in R: caffDescstat(caffPkparam(20,500)) | ||
caffOverdose | Calculate a duration of toxic concentration over specified levels (40 mg/L or 80 mg/L). | |
Usage in R: caffOverdose(caffConcTime(Weight = 20, Dose = 200, N = 20)) | ||
caffShiny | Run Shiny app to interactively simulate single and multiple dosing for plasma caffeine concentration. | |
Usage in R: caffShiny() | ||
UnitTable | Unit data of PK parameters. | |
Usage in R: UnitTable |
Results
Usage of caffsim R package
Workflow of the caffsim R package and examples of its main functions are shown in Fig. 1 and 2 The process starts with generation of the concentration-time data by for single dosing simulations and for multiple dosing simulations (Fig. 2A). The generated data frame can be then used as an input argument of function or function, which generates concentration-time plots (Fig. 2B) The properties (log-y scale, line colors, shape of points, etc.) of the plots can be further manipulated or overwritten by adding ‘+’ pipe and functions of ggplot2. The data generated by functions and can be passed to , which calculates the duration of concentration over certain levels that may lead to fatal toxicities, while showing the proportion (%) of population which exceeds such levels (Fig. 2C, Supplementary Table 1).
Application of caffsim R package to investigate pharmacokinetics of multiple oral dosing
The concentration-time profiles of caffeine following 5-times multiple oral doses of 100, 250, 400, and 550 mg (n = 200 each) in combination with dosing intervals 8 hr, 4 hr, 2 hr, and 1 hr with respect to body weights are shown in Fig. 3 The known covariate, body weights.[11] were shown to affect the clearance of caffeine, volume of distribution and ka (absorption rate constant); low-weighted population was found to have significantly high AUC, but subjects with body weights > 70 kg generally maintained low Cav,ss (average concentration at steady-state) levels (< 10 mg/L). We also observed that multiple larger doses of caffeine (> 400 mg) increased its steady-state concentration, which was generally maintained above 10 mg/L, a level considered safe for the multiple dosing of less than 250 mg.
Application of caffsim R package for developing web-based applications
The Caffeine Concentration Predictor Shiny web-application is freely available online (https://asan.shinyapps.io/caff) for a responsive simulation of the data; it can also be obtained by typing in the R console as shown in Fig. 4 The web-application is fully supported in mobile web-browsers (Fig. 4D) as well as desktop web-browsers (Fig. 4A-C). The source R script of the Shiny web-application is open to the public (https://github.com/asancpt/shiny-caff). For education purposes, the EDISON Science App, CaffeineEdison (https://www.edison.re.kr/web/cmed/run_simulation) was generated based on the caffsim R package. Although EDISON Science App does not support responsive web designs and mobile web browsers, registered students can easily perform a simulation in desktop computers, and each simulation can be recorded and reviewed later (Fig. 5). The source R script of the EDISON Science App is also open to the public (https://github.com/asancpt/edison-caff).
Discussion
We developed an R package: caffsim as a comprehensive tool for simulating plasma caffeine concentration. It is mainly targeted for researchers who study caffeine or other stimulants, and particularly those who have only basic knowledge of R, visualization, or web-based applications. We aimed to implement the following functionalities to perform a simulation: 1) An easy and straightforward generation of concentration-time data; 2) visualization of changes of concentration in single and multiple dosing; 3) a cross-platform software that can be operated in both desktop and mobile web browsers as well as in the R console; 4) an open-source software on which discussion and suggestions from users can be freely exchanged. Based on our results, we believe that the caffsim R package meets the objectives described above.
Predicting the exact plasma caffeine concentration at a given time is critical for assessing the effect of caffeine exposure to certain sensitive groups including children, adolescents, and low-weight adults. Although the data on plasma caffeine concentrations are mainly derived from reports of severe caffeine toxicities, these observations are decidedly relevant to clinical prediction. A quantitative relationship among plasma caffeine concentrations, pharmacokinetics, and toxicities is yet to be clearly concluded, but well-documented case reports studying caffeine concentration have indicated the following:
Plasma caffeine concentrations < 10 mg/L are generally safe, but caffeine concentrations of > 15 mg/L may exert toxicity.[5]
Fatalities from caffeine intoxication have been reported with plasma caffeine concentrations of < 40 mg/L.[5,13]
Fatal caffeine poisoning cases are usually reported when the concentration is > 80 mg/L.[14,15,16,17]
The physiological and pathological effects of caffeine ingestion in individuals can be more properly interpreted once the information on toxic caffeine concentration levels from case reports are aptly combined with the concentration-time data simulation obtained through the caffsim R package.
The caffsim R package also broadens the perspective on accessibility by creating and utilizing diverse web-based open-science applications such as Shiny app and EDISON Science App. We expect that the EDISON Science App based on the caffsim R package will have significant impact on relevant education, and further stimulate the development of open-science applications. This approach makes innovative and state-of-the-art technologies more accessible to both students and the public; also, physicians in training may benefit from it for understanding the pharmacokinetics following one compartment model, and for recognizing caffeine intoxication or caffeine-related syndromes.
In conclusion, we report that our newly-developed caffsim R package and its web-applications enable researchers and clinicians to perform fast, easy-to-use, and versatile simulations of caffeine dosing in various settings (in R console or in desktop and mobile web-browsers). This software will expand our knowledge of the relationship between the plasma caffeine concentration and caffeine intoxication in caffeine-sensitive groups. The caffsim R package may help people understand how plasma caffeine concentration changes over time and how long toxic caffeine concentration can last in the plasma of caffeine-sensitive groups. It may also help clinical evaluation of the relationship between caffeine intake and toxicities when suspicious acute symptoms occur.
Acknowledgements
This research was supported by the EDISON (EDucationresearch Integration through Simulation On the Net) Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Education, Science and Technology (grant number: 016M3C1A6936614). We thank Dr. Joon Seo Lim from the Scientific Publications Team at Asan Medical Center for his editorial assistance in preparing this manuscript.
Footnotes
Reviewer: This article was reviewed by peer experts who are not TCP editors.
Conflicts of interests: -Authors: No potential conflicts of interest relevant to this article were reported.
-Reviewers: Nothing to declare
-Editors: Nothing to declare
Supplementary Material
References
- 1.EFSA Panel on Dietetic Products, Nutrition and Allergies (NDA) Scientific Opinion on the safety of caffeine: Safety of caffeine. EFSA J. 2015;13:4102. doi: 10.2903/j.efsa.2015.4102. [DOI] [Google Scholar]
- 2.Reissig CJ, Strain EC, Griffiths RR. Caffeinated energy drinks--A growing problem. Drug Alcohol Depend. 2009;99:1–10. doi: 10.1016/j.drugalcdep.2008.08.001. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 3.Pray L. Caffeine in food and dietary supplements: examining safety: workshop summary. Washington D.C: The National Academies Press; 2014. [PubMed] [Google Scholar]
- 4.Seifert SM, Schaechter JL, Hershorin ER, Lipshultz SE. Health Effects of Energy Drinks on Children, Adolescents, and Young Adults. Pediatrics. 2011;127:511–528. doi: 10.1542/peds.2009-3592. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5.Banerjee P, Ali Z, Levine B, Fowler DR. Fatal Caffeine Intoxication: A Series of Eight Cases from 1999 to 2009. J Forensic Sci. 2014;59:865–868. doi: 10.1111/1556-4029.12387. [DOI] [PubMed] [Google Scholar]
- 6.Trabulo D, Marques S, Pedroso E. Caffeinated energy drink intoxication. BMJ Case Rep. 2011;2011:pii:bcr0920103322. doi: 10.1136/bcr.09.2010.3322. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Jun N, Lee A, Baik I. Associations of Caffeinated Beverage Consumption and Screen Time with Excessive Daytime Sleepiness in Korean High School Students. Clin Nutr Res. 2017;6:55–60. doi: 10.7762/cnr.2017.6.1.55. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 8.Temple JL, Ziegler AM, Graczyk AM, Crandall A. Effects of acute and chronic caffeine on risk-taking behavior in children and adolescents. J Psychopharmacol. 2017;31:561–568. doi: 10.1177/0269881117691568. [DOI] [PubMed] [Google Scholar]
- 9.Perera V, Gross AS, Xu H, McLachlan AJ. Pharmacokinetics of caffeine in plasma and saliva, and the influence of caffeine abstinence on CYP1A2 metrics. J Pharm Pharmacol. 2011;63:1161–1168. doi: 10.1111/j.2042-7158.2011.01326.x. [DOI] [PubMed] [Google Scholar]
- 10.Perera V, Gross AS, Forrest A, Landersdorfer CB, Xu H, Ait-Oudhia S, et al. A Pharmacometric Approach to Investigate the Impact of Methylxanthine Abstinence and Caffeine Consumption on CYP1A2 Activity. Drug Metab Dispos. 2013;41:1957–1966. doi: 10.1124/dmd.113.053074. [DOI] [PubMed] [Google Scholar]
- 11.Lee JW, Kim Y, Perera V, McLachlan AJ, Bae KS. Prediction of plasma caffeine concentrations in young adolescents following ingestion of caffeinated energy drinks: a Monte Carlo simulation. Eur J Pediatr. 2015;174:1671–1678. doi: 10.1007/s00431-015-2581-x. [DOI] [PubMed] [Google Scholar]
- 12.Wickham H. ggplot2: Elegant Graphics for Data Analysis. New York: Springer-Verlag; 2016. [Google Scholar]
- 13.Cannon ME, Cooke CT, McCarthy JS. Caffeine-induced cardiac arrhythmi a: an unrecognised danger of healthfood products. Med J Aust. 2001;174:520–521. doi: 10.5694/j.1326-5377.2001.tb143404.x. [DOI] [PubMed] [Google Scholar]
- 14.Holmgren P, Nordén-Pettersson L, Ahlner J. Caffeine fatalities--four case reports. Forensic Sci Int. 2004;139:71–73. doi: 10.1016/j.forsciint.2003.09.019. [DOI] [PubMed] [Google Scholar]
- 15.Kerrigan S, Lindsey T. Fatal caffeine overdose: two case reports. Forensic Sci Int. 2005;153:67–69. doi: 10.1016/j.forsciint.2005.04.016. [DOI] [PubMed] [Google Scholar]
- 16.Thelander G, Jönsson AK, Personne M, Forsberg GS, Lundqvist KM, Ahlner J. Caffeine fatalities--Do sales restrictions prevent intentional intoxications? Clin Toxicol (Phila) 2010;48:354–358. doi: 10.3109/15563650903586752. [DOI] [PubMed] [Google Scholar]
- 17.de Wijkerslooth LR, Koch BC, Malingré MM, Smits P, Bartelink AKM. Lifethreatening hypokalaemia and lactate accumulation after autointoxication with Stacker 2®, a “powerful slimming agent. ” Br J Clin Pharmacol. 2008;66:728–731. doi: 10.1111/j.1365-2125.2008.03279.x. [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.