Description Usage Arguments Details Value Author(s) Examples

Compute the difference between two maps.

If the map of the standard deviation is given, the difference is divided by the standard deviation.

1 |

`mapin` |
raster map |

`mapref` |
raster map 2 (the reference) |

`mapsd` |
raster map conaining the standard deviation values. |

`outfile` |
file where the difference map is saved.
If |

If mapsd is defined :

*diff = \frac{mapin - mapref}{mapsd}*

else :

*diff = mapin - mapref*

Returns the difference map

Romain Frelat and Bruno Gerard

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
ndvidirectory=paste(system.file("extdata/VITO_Mzimba",
package="ndvits"), "/", sep="")
region="Mzimba"
filein=timetoMap(ndvidirectory,region, 2004,1,1)
filein2=timetoMap(ndvidirectory,region, 2005,1,1)
#load the maps
map04=readpartGDAL(filein)
map05=readpartGDAL(filein2)
#computing the difference of the 2 maps
diff=mapdiff(map04, map05)
#plot the difference map :
savemap(diff)
``` |

ndvits documentation built on May 31, 2017, 2:06 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.