title: R: eval(parse()) error message: cannot open file even though "text=" is specified in parse
body: <p>I'm running analysis for a list of countries several times and during each iteration the result should be added to a vector. Below I show a simplified example without the loop for just one country. Even though I thoroughly looked for solutions, I could not find an answer.</p>
  
  <pre><code>#this is my simplified country vector with just 1 country    
  country&lt;-c("Spain")
  
  #This is the vector that should hold the results of multiple iterations
  #for now, it contains only the result of the first iteration   
  Spain.condition1&lt;- 10
  
  #reading result vector in a variable (this is automized in a loop in my code)
  resultVector&lt;-paste(country,"condition1",sep=".")
  
  #when I call the content of the vector with parse, eval
  #I see the content of the vector as expected
  
  eval(parse(text=resultVector))
  
  #however, when I try to add a second result to it
  
  eval(parse(text=resultVector))[2]&lt;-2
  
  #I get following error message: 
  
  #Error in file(filename, "r") : cannot open the connection
  #In addition: Warning message:
  #In file(filename, "r") :
  #  cannot open file 'Spain.condition1': No such file or directory
  </code></pre>
  
  <p>Could anyone help me or put me in the right direction?</p>