<html style="direction: ltr;">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body bidimailui-charset-is-forced="true" style="direction: ltr;"
text="#000000" bgcolor="#FFFFFF">
<p>I am trying to run a function (mk.test to find MannKendall
trends) using st_apply over a "rolling" window for a time series
of rasters in a stars object. <br>
</p>
<p>When I use subscript notation to slice out the window dimension
with a looping variable I get an error:</p>
<p><br>
</p>
<p>Error in loadNamespace(name) : there is no package called ‘yr’<br>
Calls: [ ... tryCatch -> tryCatchList -> tryCatchOne ->
<Anonymous><br>
Execution halted<br>
<br>
</p>
<p>However If I replace the subscript with integers it works fine.
(see attached)<br>
</p>
<p>What is the correct way to work this out?<br>
</p>
<p><br>
</p>
<p>Attached is a reprex with a small subset of my data. (The script
starts with a long structure, code is at the end)<br>
</p>
<p><br>
</p>
<p>Thanks<br>
</p>
<pre class="moz-signature" cols="72"> --
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918</pre>
</body>
</html>