<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content='function used to extract time series data from rts files created by MODIStsp
on spatial locations provided in the form of "R" spatial objects (SpatialPoints,
SpatialPolygons, etc.)'><title>Extract data from MODIStsp time series — MODIStsp_extract • MODIStsp</title><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="/apple-touch-icon.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.js"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Extract data from MODIStsp time series — MODIStsp_extract"><meta property="og:description" content='function used to extract time series data from rts files created by MODIStsp
on spatial locations provided in the form of "R" spatial objects (SpatialPoints,
SpatialPolygons, etc.)'><meta property="og:image" content="https://docs.ropensci.org/MODIStsp/logo.png"><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]--><!-- Matomo --><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.css"><script src="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.js" data-cfasync="false"></script><script src="https://ropensci.org/scripts/matomo.js"></script><noscript><p><img src="https://ropensci.matomo.cloud/matomo.php?idsite=1&amp;rec=1" style="border:0;" alt=""></p></noscript><!-- End Matomo Code --></head><body>
    <a href="#main" class="visually-hidden-focusable">Skip to contents</a>
    

    <nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
    <a href="https://ropensci.org" class="external-link"><img src="https://ropensci.org/img/icon_short_white.svg" id="hexlogo" alt="rOpenSci"></a>
    <a class="navbar-brand me-2" href="../index.html">MODIStsp</a>

    <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Released version">2.1.0</small>

    
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>

    <div id="navbar" class="collapse navbar-collapse ms-3">
      <ul class="navbar-nav me-auto"><li class="nav-item">
  <a class="nav-link" href="../index.html">
    <span class="fa fa-home"></span>
     
  </a>
</li>
      </ul><form class="form-inline my-2 my-lg-0" role="search">
        <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>

      <ul class="navbar-nav"><li class="nav-item dropdown">
  <a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown--articles">
    <span class="fas fa fas fa-book"></span>
     
    Articles
  </a>
  <div class="dropdown-menu" aria-labelledby="dropdown--articles">
    <a class="dropdown-item" href="../articles/installation.html">Installation</a>
    <a class="dropdown-item" href="../articles/interactive_execution.html">Interactive Execution - the MODIStsp GUI</a>
    <a class="dropdown-item" href="../articles/noninteractive_execution.html">Non-Interactive Execution from within R</a>
    <a class="dropdown-item" href="../articles/standalone_execution.html">Standalone Execution and Scheduled Processing</a>
    <a class="dropdown-item" href="../articles/output.html">Outputs Format and Naming Conventions</a>
    <a class="dropdown-item" href="../articles/analyze.html">Accessing and Analyzing Processed Data from R</a>
    <a class="dropdown-item" href="../articles/products_list.html">Supported MODIS Products</a>
  </div>
</li>
<li class="nav-item">
  <a class="nav-link" href="../articles/faq.html">
    <span class="fa fa-question-circle-o"></span>
     
    faq
  </a>
</li>
<li class="nav-item">
  <a class="nav-link" href="../news/index.html">
    <span class="fa fa-newspaper-o"></span>
     
    news
  </a>
</li>
<li class="active nav-item">
  <a class="nav-link" href="../reference/index.html">
    <span class="fa fa-file-code-o"></span>
     
    functions
  </a>
</li>
<li class="nav-item">
  <a class="external-link nav-link" href="https://github.com/ropensci/MODIStsp/">
    <span class="fa fa-github fa-lg"></span>
     
    github
  </a>
</li>
<li class="nav-item">
  <a class="nav-link" href="../articles/lorenzo.html">
    <span class="fa fa-cross"></span>
     
    dedication
  </a>
</li>
      </ul></div>

    
  </div>
</nav><div class="container template-reference-topic">
<div class="row">
  <main id="main" class="col-md-9"><div class="page-header">
      <img src="../logo.png" class="logo" alt=""><h1>Extract data from MODIStsp time series</h1>
      <small class="dont-index">Source: <a href="https://github.com/ropensci/MODIStsp/blob/HEAD/R/MODIStsp_extract.R" class="external-link"><code>R/MODIStsp_extract.R</code></a></small>
      <div class="d-none name"><code>MODIStsp_extract.Rd</code></div>
    </div>

    <div class="ref-description section level2">
    <p>function used to extract time series data from rts files created by MODIStsp
on spatial locations provided in the form of "R" spatial objects (SpatialPoints,
SpatialPolygons, etc.)</p>
    </div>

    <div class="section level2">
    <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
    <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">MODIStsp_extract</span><span class="op">(</span></span>
<span>  <span class="va">in_rts</span>,</span>
<span>  <span class="va">sf_object</span>,</span>
<span>  start_date <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span>  end_date <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span>  id_field <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span>  FUN <span class="op">=</span> <span class="st">"mean"</span>,</span>
<span>  out_format <span class="op">=</span> <span class="st">"xts"</span>,</span>
<span>  small <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span>  small_method <span class="op">=</span> <span class="st">"centroids"</span>,</span>
<span>  na.rm <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span>  verbose <span class="op">=</span> <span class="cn">FALSE</span></span>
<span><span class="op">)</span></span></code></pre></div>
    </div>

    <div class="section level2">
    <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
    <dl><dt>in_rts</dt>
<dd><p>A <code>RasterStack</code> bject created by MODIStsp
(it MUST contain acquisition dates in the "Z" attribute)</p></dd>


<dt>sf_object</dt>
<dd><p>"sf" object OR name of an GDAL-readable vector file specifying the
"area" from which data has to be extracted.</p><ul><li><p>If <code>sf_object</code> represents lines, the output object contains one column for
each line, containing values obtained applying the function specified
as the FUN argument over all pixels touched by the line, and one line for
each date.</p></li>
<li><p>If <code>sf_object</code> represents points, the output object contains one column
for each point, containing values of the cells corresponding to the point,
and one line for each date.</p></li>
<li><p>If <code>sf_object</code> represents polygons, the output object contains one column
for each polygon, containing values obtained applying the function
specified as the FUN argument over all pixels belonging to the polygon,
and one line for each date</p></li>
</ul></dd>


<dt>start_date</dt>
<dd><p>object of class <code>Date</code>, <code>POSIXct</code> or <code>POSIXlt</code> OR <code>character</code>
coercible to Date class (format = "yyyy-mm-dd")Starting date of the period
to be considered for data extraction . If not provided, the first date of
the RasterStack is used.</p></dd>


<dt>end_date</dt>
<dd><p>object of class <code>Date</code>, <code>POSIXct</code> or <code>POSIXlt</code> OR <code>character</code>
coercible to Date class (format = "yyyy-mm-dd"). Ending date of the period
to be considered for data extraction . If not provided, the last date of
the RasterStack is used.</p></dd>


<dt>id_field</dt>
<dd><p><code>character</code> name of the column of the input sp object or
shapefile to be used in the data extraction. Values contained in the column
MUST be unique. The names of the columns of the output are taken from this
column. If not provided, or an invalid value is provided, then the names
of the columns of the output reflect the number of the feature in
<code>sf_object</code>.</p></dd>


<dt>FUN</dt>
<dd><p>function to summarize the values (e.g. mean) on polygon data frames.
The function should take a single numeric vector as argument and return a
single value (e.g. mean, min or max), and accept a na.rm argument. Thus,
standard R functions not including an na.rm argument must  be wrapped as in
this example: fun=function(x,...)length(x). Defaults to "mean"</p></dd>


<dt>out_format</dt>
<dd><p><code>character ["xts" | "dframe"]</code> If dframe, the output is a
data frame with dates in the first column and extracted data in the others,
otherwise it is a <code>xts</code> object, Default: "xts"</p></dd>


<dt>small</dt>
<dd><p><code>logical</code> If TRUE, and input is polygons, then values are
returned also for polygons not covering at least one raster cell. "Included"
cells in this case depend on the values of the "small_method" parameter.</p></dd>


<dt>small_method</dt>
<dd><p><code>character ["centroids" | "full"]</code> If small == TRUE and
input is polygons, controls which cells are "extracted" for small polygons.
If set to "centroids" (default), then only the cells corresponding to polygon
centroid are considered (faster, may have problems on strangely shaped
polygons). If set to "full", then all cells intersected by the small polygon
are extracted and used in calculations, Default: "centroids"</p></dd>


<dt>na.rm</dt>
<dd><p><code>logical</code> If TRUE, and sf_object is a polygon, then na.rm = TRUE
is used when applying FUN to the different pixels of the polygon, Default = TRUE.</p></dd>


<dt>verbose</dt>
<dd><p><code>logical</code> If TRUE, messages on processing status are sent
to the console. Default = TRUE.</p></dd>

</dl></div>
    <div class="section level2">
    <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
    

<p>data.frame or xts object. Each column of data corresponds to one
point or one polygon, each row to a date.</p>
    </div>
    <div class="section level2">
    <h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
    <p>The function takes as input a RasterStack object containing time information
in the "z" attribute (set by <code><a href="https://rdrr.io/pkg/raster/man/zvalues.html" class="external-link">raster::setZ</a></code>), a starting and ending date
and a standard "R" spatial object, and returns the time series for the spatial locations
specified in the spatial object in the form of a "R" xts object OR a plain data.frame
with a "date" column in first position.
If the input spatial object is a "point" or "line" one, the  output object
contains one column for each specified point, or for each cell intersecting
the line, and one line for each date. If the input spatial object is a "polygon"
one, the output object contains one column for each polygon, containing values
obtained applying the function specified as the FUN argument over all pixels
belonging to the polygon, and one line for each date.</p>
    </div>
    <div class="section level2">
    <h2 id="note">Note<a class="anchor" aria-label="anchor" href="#note"></a></h2>
    <p>License: GPL 3.0</p>
    </div>
    <div class="section level2">
    <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2>
    <p>Lorenzo Busetto, phD (2015 - 2017)
email: busetto.l@irea.cnr.it</p>
    </div>

    <div class="section level2">
    <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
    <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="cn">FALSE</span><span class="op">)</span> <span class="op">{</span></span></span>
<span class="r-in"><span><span class="co"># Extract average and standard deviation values from a rts object created by</span></span></span>
<span class="r-in"><span><span class="co"># MODIStsp for each polygon of a shapefile, for each date in the period</span></span></span>
<span class="r-in"><span><span class="co"># between 2001-01-01 and 2014-12-31</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># The example uses tif files in testdata/VI_16Days_500m_v61 to build</span></span></span>
<span class="r-in"><span><span class="co"># a MODIStsp rasterStack corresponding to the 2016 time series of the NDVI index</span></span></span>
<span class="r-in"><span><span class="co"># over the Como Lake (Italy). It then extracts data on polygons corresponding</span></span></span>
<span class="r-in"><span><span class="co"># to different land cover classes saved in testdata/extract_polys.shp</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># First, prepare the test dataset.</span></span></span>
<span class="r-in"><span><span class="co"># __NOTE__ To avoid redownloading, here we copy some test data from MODIStsp</span></span></span>
<span class="r-in"><span><span class="co"># installation folder to tempdir and use it to create a test time series.</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">test_zip</span> <span class="op">&lt;-</span>  <span class="fu"><a href="https://rdrr.io/r/base/system.file.html" class="external-link">system.file</a></span><span class="op">(</span><span class="st">"testdata/VI_16Days_500m_v61/NDVI.zip"</span>,</span></span>
<span class="r-in"><span>                         package <span class="op">=</span> <span class="st">"MODIStsp"</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/files2.html" class="external-link">dir.create</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/file.path.html" class="external-link">file.path</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/tempfile.html" class="external-link">tempdir</a></span><span class="op">(</span><span class="op">)</span>, <span class="st">"MODIStsp/VI_16Days_500m_v61"</span><span class="op">)</span>,</span></span>
<span class="r-in"><span>           showWarnings <span class="op">=</span> <span class="cn">FALSE</span>, recursive <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="fu">utils</span><span class="fu">::</span><span class="fu"><a href="https://rdrr.io/r/utils/unzip.html" class="external-link">unzip</a></span><span class="op">(</span><span class="va">test_zip</span>,</span></span>
<span class="r-in"><span>             exdir <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/file.path.html" class="external-link">file.path</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/tempfile.html" class="external-link">tempdir</a></span><span class="op">(</span><span class="op">)</span>, <span class="st">"MODIStsp/VI_16Days_500m_v61"</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">opts_file</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.file.html" class="external-link">system.file</a></span><span class="op">(</span><span class="st">"testdata/test_extract.json"</span>, package <span class="op">=</span> <span class="st">"MODIStsp"</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="fu"><a href="MODIStsp.html">MODIStsp</a></span><span class="op">(</span>opts_file <span class="op">=</span> <span class="va">opts_file</span>, gui <span class="op">=</span> <span class="cn">FALSE</span>, verbose <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># Now load the MODIStsp stack: This is a MODIS NDVI time series ranging between</span></span></span>
<span class="r-in"><span><span class="co"># 2016-01-01 and 2016-12-18</span></span></span>
<span class="r-in"><span><span class="co"># __NOTE__: MODIStsp rasterStack files are always saved in the "Time_Series\/RData"</span></span></span>
<span class="r-in"><span><span class="co"># subfolder of your main output folder - see</span></span></span>
<span class="r-in"><span><span class="co"># "https://docs.ropensci.org/MODIStsp/articles/output.html")</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># Specify the filename of the RData RasterStack of interest</span></span></span>
<span class="r-in"><span><span class="va">stack_file</span>  <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/file.path.html" class="external-link">file.path</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/tempfile.html" class="external-link">tempdir</a></span><span class="op">(</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> <span class="st">"MODIStsp/VI_16Days_500m_v61/Time_Series/RData/Terra/NDVI"</span>,</span></span>
<span class="r-in"><span>  <span class="st">"MOD13A1_NDVI_1_2016_353_2016_RData.RData"</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/basename.html" class="external-link">basename</a></span><span class="op">(</span><span class="va">stack_file</span><span class="op">)</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">ts_data</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/get.html" class="external-link">get</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/load.html" class="external-link">load</a></span><span class="op">(</span><span class="va">stack_file</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="va">ts_data</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># Now load a shapefile containing polygons from which we want to extract data</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">polygons</span> <span class="op">&lt;-</span> <span class="fu">sf</span><span class="fu">::</span><span class="fu"><a href="https://r-spatial.github.io/sf/reference/st_read.html" class="external-link">st_read</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/system.file.html" class="external-link">system.file</a></span><span class="op">(</span><span class="st">"testdata/extract_polys.shp"</span>,</span></span>
<span class="r-in"><span>                           package <span class="op">=</span> <span class="st">"MODIStsp"</span><span class="op">)</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="va">polygons</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># Finally, extract the average values for each polygon and date and plot the</span></span></span>
<span class="r-in"><span><span class="co"># results</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">out_dataavg</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/message.html" class="external-link">suppressMessages</a></span><span class="op">(</span><span class="fu">MODIStsp_extract</span><span class="op">(</span><span class="va">ts_data</span>, <span class="va">polygons</span>, id_field <span class="op">=</span> <span class="st">"lc_type"</span>,</span></span>
<span class="r-in"><span>                             small <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/utils/head.html" class="external-link">head</a></span><span class="op">(</span><span class="va">out_dataavg</span><span class="op">)</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/plot.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">out_dataavg</span>, legend.loc <span class="op">=</span> <span class="st">"topleft"</span><span class="op">)</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># use a different summarization function</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">out_datasd</span> <span class="op">&lt;-</span> <span class="fu">MODIStsp_extract</span><span class="op">(</span><span class="va">ts_data</span>, <span class="va">polygons</span>, id_field <span class="op">=</span> <span class="st">"lc_type"</span>,</span></span>
<span class="r-in"><span>                              FUN <span class="op">=</span> <span class="st">"sd"</span>, small <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/utils/head.html" class="external-link">head</a></span><span class="op">(</span><span class="va">out_datasd</span><span class="op">)</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># (See also https://docs.ropensci.org/MODIStsp/articles/Analyze.html for a</span></span></span>
<span class="r-in"><span><span class="co"># worked-out example)</span></span></span>
<span class="r-in"><span><span class="op">}</span></span></span>
</code></pre></div>
    </div>
  </main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
    </nav></aside></div>


    <footer><!-- begin footer --><div class="footer">
    <div class="container">
        <div class="row start top-4 bottom-8">
            <div class="col-2"> <img id="footerlogo" src="https://ropensci.org/img/icon_short_white.svg"></div>
            <div class="col-10">
                <div class="row">
                    <div class="col-md-4 col-xs-6">
                        <a href="https://github.com/ropensci" target="_blank" class="external-link"><div class="icon fab fa-github"></div></a>
                        <a href="https://github.com/ropenscilabs" target="_blank" class="external-link"><div class="icon fa fa-flask"></div></a>
                        <a href="https://hachyderm.io/@ropensci" target="_blank" class="external-link"><div class="icon fab fa-mastodon"></div></a>
                        <a href="https://vimeo.com/ropensci" target="_blank" class="external-link"><div class="icon fab fa-vimeo"></div></a>
                    </div>
                </div>
                <div class="row top-4">
                    <div class="col-md-2 col-sm-4">
                        <ul><h5 class="bottom-2">About</h5>
                            <li><a href="https://ropensci.org/about" class="external-link">About rOpenSci</a></li>
                            <li><a href="https://ropensci.org/software-review" class="external-link">Software Review</a></li>
                            <li><a href="https://ropensci.org/about#team" class="external-link">Our Team</a></li>
                            <li><a href="https://ropensci.org/careers" class="external-link">Jobs</a></li>
                            <li><a href="https://ropensci.org/donate" class="external-link">Donate</a></li>
                            <li><a href="https://ropensci.org/contact" class="external-link">Contact Us</a></li>
                        </ul></div>
                    <div class="col-md-3 col-sm-4">
                        <ul><h5 class="bottom-2">Community</h5>
                            <li><a href="https://ropensci.org/community/" class="external-link">Our Community</a></li>
                            <li><a href="https://ropensci.org/commcalls/" class="external-link">Community calls</a></li>
                            <li><a href="https://ropensci.org/events/" class="external-link">Events</a></li>
                            <li><a href="https://discuss.ropensci.org/" class="external-link">Join the Discussion</a></li>
                            <li><a href="https://ropensci.org/code-of-conduct" class="external-link">Code of conduct</a></li>
                        </ul></div>
                    <div class="col-md-2 col-sm-4">
                        <ul><h5 class="bottom-2">Resources</h5>
                            <li><a href="https://ropensci.org/packages/" class="external-link">Packages</a></li>
                            <li><a href="https://ropensci.org/usecases/" class="external-link">Use Cases</a></li>
                            <li><a href="https://ropensci.org/talks-papers/" class="external-link">Talks &amp; Publications</a></li>
                            <li><a href="https://docs.ropensci.org/" class="external-link">Documentation</a></li>
                            <li><a href="https://ropensci.org/news/" class="external-link">Newsletter</a></li>
                            <li><a href="https://ropensci.org/how-to-cite-ropensci/" class="external-link">Cite rOpenSci</a></li>
                        </ul></div>
                    <div class="col-md-4 col-xs-12">
                        <h5 class="bottom-2"></h5>

                        <p>rOpenSci is a fiscally sponsored project of <a href="http://numfocus.org" class="external-link">NumFOCUS</a>.</p>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- / end footer -->


    </footer></div>

  

  

  </body></html>

