Source .R file as an R package

say I have a file utils.R than contains some functions foo, moo

I'd like to be able to source this file and then refer to the functions and source file like a typical R package, say:

customSource(file='utils.R', name='my_utils')

How can this be done?

Read more here:

Content Attribution

This content was originally published by at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: