Reputation: 135
Say I have made a function "function.r", after editing the function I have to reload into my global environment via source('function.r'). Is there anyway I can get around having to reloading it into my global environment every time I make an edit?
I'm looking for the same functionality as .m files in Matlab, where when I call the function/script it executes the .m file as opposed calling a preloaded function.
I'm using R studio, if that makes any difference
Upvotes: 3
Views: 944
Reputation: 7908
You can use the Source on save option. Just check the check box above your code.
Upvotes: 6