title: Include data examples in developing R packages
body: <p>I am eager to learn how to incorporate data examples as comments written above the functions, such as:</p>
  
  <pre><code>##' @examples 
  ##' ## Set working directory...
  ##' ## Load data into R session:
  ##' data &lt;- system.file("extdata", "data.txt", package="...", sep="\t", header=TRUE, stringsAsFactors = FALSE)
  ##'
  ##' ## For reproducible results:
  ##' set.seed(999)
  </code></pre>
  
  <p>I put my "data.txt" file in the directory: /pkg_Name/inst/extdata/. However, R CMD check indicates error in this step. If I proceed to R CMD build and R CMD install, then after loading the package, I cannot get the data into R session... Could anyone tell me what went wrong? Is this the correct way to include data examples at the end of the function help document?</p>
  
  <p>Thanks a lot!</p>