[R] selectively importing functions etc. from files

Faheem Mitha faheem at email.unc.edu
Sun Nov 30 03:22:28 CET 2008


Hi,

If I want to import the contents of a R file into another one, I can do

source("foo.R")

However, this imports everything from foo.R, including all functions and 
global variables. Is there a way of selectively importing individual 
functions etc., in a similar fashion to Python's

from foo import bar

? Thanks in advance. Please cc me on any reply.
                                                         Regards, Faheem.



More information about the R-help mailing list