Create rap_functions.R

The primary functions.