title: Getting an error could not find function in a for loop
body: <p>I'm running the following code:</p>
  
  <pre><code>dat1 &lt;- returns
  
  for (j in 1:12) set(dat1, j = j, value = wind(dat1[[j]]))
  </code></pre>
  
  <p>And getting the following error message:</p>
  
  <pre><code>Error in wind(dat1[[j]]) : could not find function "wind"
  </code></pre>
  
  <p>My search for a solution mainly involves packages that aren't properly installed. I'm not 100% sure but I think it isn't related to that.</p>
  
  <p>Best</p>