Dear all,
I have saved few variable names into local files,
I wanted to make a function that load this files and "generates" the variable names into my working environment. I have tried to do that as a function but my problem is 

that this function does not return the variable names


load_data<-function(path,Reload=FALSE){

    if (Reload==TRUE){
     
      print("Loading results")

      # FirstSet
      load(file=paste(path,'first',sep=""))
      first<-Set

      # SecondSet
      load(file=paste(path,'second',sep=""))
      second<-Set

..................(part omittted here)

      save( first, second,....(part omitted here)...,     file=paste(path,'Results',sep=""))
    }
    
    return (load(file=paste(path,'Results',sep="")))

}

so my idea was the following:
I call the function and it retuns the values first,second,... loaded into the current working space.
If I want to refresh them, something has changed to the firstDataSet I set the function's variable Reload=True and thus all the data are refreshed.
The problem is not that the return statement I ahve at the end of the function does not return the loaded variable to the working environment but only the status of the load command.

Do you know how I can change that so my function returns also Loaded Variable names to the environment?

Alex
	[[alternative HTML version deleted]]

