[R] namespace? environment? how to manage functions?
Michael Friendly
friendly at yorku.ca
Thu Jul 22 14:58:11 CEST 2010
In http://tolstoy.newcastle.edu.au/R/e7/help/09/06/1900.html
Jim Holtman wrote:
Here is the way that I do it instead of creating a package of my
functions. I 'source' the file into an environment and then attach the
environment to keep the global from being clustered:
# read my functions into a environment
.my.env <- new.env()
sys.source('c:/perf/bin/perfmon.r', envir=.my.env) attach(.my.env)
Is there a way to do this directly in .Rprofile without sourcing from a
separate file? I've looked at
sys.source, but don't understand how it works.
--
Michael Friendly Email: friendly AT yorku DOT ca
Professor, Psychology Dept.
York University Voice: 416 736-5115 x66249 Fax: 416 736-5814
4700 Keele Street Web: http://www.datavis.ca
Toronto, ONT M3J 1P3 CANADA
More information about the R-help
mailing list