Creating a new package

Before getting started, you will need to load two packages:

> install.packages("roxygen2")> install.packages("devtools")

You now want to open File in RStudio and select New Project, which will put you at this point:

Select a new directory as desired, and specify R Package, as shown in the following screenshot:

You will now name your package – I've innovatively called this one package – and select Create Project:

Go to ...

Get Mastering Machine Learning with R - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.