That would be as simple as
If you want to get a quickstart on the bupaR package: you may find the cheat sheet of bupaR helpful to get a nice overview of all its capabilities.
Aside from that, as you mentioned being new to R, there are several excellent online books available which can help you get started as well, such as:
This is the website for “R for Data Science” . This book will teach you how to do data science with R: You’ll learn how to get your data into R, get it into the most useful structure, transform it, visualise it and model it. In this book, you will find a practicum of skills for data science. Just as a chemist learns how to clean test tubes and stock a lab, you’ll learn how to clean data and draw plots—and many other things besides. These are the skills that allow data science to happen, and here you will find the best practices for doing each of these things with R. You’ll learn how to use the grammar of graphics, literate programming, and reproducible research to save time. You’ll also learn how to manage cognitive resources to facilitate discoveries when wrangling, visualising, and exploring data.
And there are also several (free) online courses available, one of them is
Hope this helps you get started