title: 'data' is not an exported object from 'namespace:my_package'
body: <p>I'm writing a function that uses an external data as follow:</p>
  <p>First, it checks if the data is in the <code>data</code>/ folder, if it is not, it creates the <code>data</code>/ folder and then downloads the file from github;</p>
  <p>If the data is already in the <code>data/</code> folder, it reads it, and perform the calculations.</p>
  <p>The question is, when I run:</p>
  <pre><code>devtools::check()
  </code></pre>
  <p>it returns:</p>
  <pre><code>Error: 'data' is not an exported object from 'namespace:my_package'
  </code></pre>
  <p>Should I manually put something on <code>NAMESPACE</code>?</p>
  <p>An example:</p>
  <pre><code>my_function &lt;- function(x){
  if(file.exists(&quot;data/data.csv&quot;)){
      my_function_calculation(x = x)
    } else {
      print(&quot;Downloading source data...&quot;)
      require(RCurl)
      url_base &lt;-
   getURL(&quot;https://raw.githubusercontent.com/my_repository/data.csv&quot;)
      dir.create(paste0(getwd(),&quot;/data&quot;))
      write.table(url_base,&quot;data/data.csv&quot;, sep = &quot;,&quot;, quote = FALSE)
      my_function_calculation(x = x)
    }
  }
  
  my_function_calculation &lt;- function(x = x){
      data &lt;- NULL
      data &lt;- suppressMessages(fread(&quot;data/data.csv&quot;))
      #Here, I use data...
      return(data)
  }
  </code></pre>