I'm working on a package for R to create graphs for modeling interactions between latent variables in SEM. At the moment, I have one function which performs the necessary steps to prepare the data for graphing, and then separate graphing functions depending on what graph type (or types) the user wants. To get the prepped data from the setup function to the graphing functions, I currently put the data into a dataframe and declare it as a global variable (<<-). Is there a way to make a data frame or a set of variables available to all the functions in a package but NOT to users? As it is, if users were to use the var name of the data frame for something else, the data will be lost and they'll have to rerun setup before creating their graphs.
Thanks, Bethany -- Bethany Kok Graduate Student Department of Psychology, Davie Hall, CB 3270 University of North Carolina at Chapel Hill Chapel Hill, NC 27599 TEL: 919-667-4752 ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.