You are here

Write your own personal R package

This workshop for intermediate R users will teach you how to write your own R package. Everyone has functions that they've written that they reuse across different projects, and keeping track of them all and the slight differences between them is tiresome, let alone copy-pasting and then modifying yet another version. By writing your own R package you can properly document and access these functions from one place, and even share your own package with others.  
 
This workshop assumes that you are already comfortable in base R. For example, you should be able to: 
  • Write for-loops and if-statements 
  • Write an R script that can run on its own without manual user intervention
  • Write your own function (although we suggest that you already know how to do this, it's not required and will be briefly covered). 

By the end of the workshop you will be able to:

  • Write your own functions for use in your scripts 
  • Use RStudio to write a package containing functions you want 
  • Write help files for your functions that are accessible using ?YourFunctionNameHere
  • Include sample datasets in your package 
  • Export your package to share with others
 

 

 

Audience: 

Upcoming Workshops

No upcoming instances of this workshop found.