Wednesday, 16 August 2017

MODIStsp 1.3.3 is out - Speeding things up and squashing some bugs !

  A new version of MODIStsp (1.3.3) is on CRAN as of today ! Below, you can find a short description of the main improvements.

Processing speed improvements


  Processing of MODIS layers after download (i.e., scale and offset calibration, computation of Spectral Indexes and Quality Indicators) is now much faster.


  As you can see in the figure, processing time was almost halved on my (not so fast) laptop. This was achieved by modifying all computation functions so to use `raster::calc()` and `raster::overlay()` (more on this in a later post).

Although speed is also limited by download speed and compression options, this will allow to save quite some time when working on large areas and with many MODIS layers.




Tuesday, 1 August 2017

Building a website with pkgdown: a short guide

As promised in my last post, here is a short guide with some tips and tricks for building a documentation website for an R package using pkgdown.

In the end, this guide ended up way longer than I was expecting, but I hope you'll find it useful, although it often replicates information already available in pkgdown documentation !

Prerequisites


To build a website using pkgdown, all you need to have is an R package hosted on Git Hub, with a file structure "tweaked" with some functionality provided by devtools

Assuming you are using RStudio, and that you didn't already do this, open the project corresponding to your package and (as a minimum) run:

require(devtools)
use_readme_rmd()
use_news_md()
use_vignette("test")  #substitute with the name of your package