MADscatterplot: MAD scatterplot

Description Usage Arguments Value See Also Examples

View source: R/MADscatterplot.R

Description

Generates a scatterplot indicating the distribution of values from two images in relation to the 1:1 line

Usage

1
MADscatterplot(grid1, grid2, strata=NULL)

Arguments

grid1

object of class RasterLayer corresponding to the first image

grid2

object of class RasterLayer corresponding to the second image

strata

object of class RasterLayer corresponding to the mask or strata image

Value

a ggplot object corresponding to the scatterplot

See Also

MAD

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
old.par <- par(no.readonly = TRUE)
grid1 <- raster(system.file("external/GRID1_INT.rst", package="diffeR"))
grid2 <- raster(system.file("external/GRID2_INT.rst", package="diffeR"))
strata <- raster(system.file("external/strata_int.rst", package="diffeR"))
MADscatterplot(grid1, grid2, strata)

veg_obs1 <- raster(system.file("external/veg_obs1.rst", package="diffeR")) 
veg_pre1 <- raster(system.file("external/veg_pre1.rst", package="diffeR"))
veg_mask1 <- raster(system.file("external/veg_mask1.rst", package="diffeR")) 
MADscatterplot(veg_obs1, veg_pre1, veg_mask1) 
par(old.par)

Example output

Loading required package: rgdal
Loading required package: sp
rgdal: version: 1.2-10, (SVN revision 673)
 Geospatial Data Abstraction Library extensions to R successfully loaded
 Loaded GDAL runtime: GDAL 1.10.1, released 2013/08/26
 Path to GDAL shared files: /usr/share/gdal/1.10
 Loaded PROJ.4 runtime: Rel. 4.8.0, 6 March 2012, [PJ_VERSION: 480]
 Path to PROJ.4 shared files: (autodetected)
WARNING: no proj_defs.dat in PROJ.4 shared files
 Linking to sp version: 1.2-3 
Loading required package: raster
Loading required package: ggplot2
Warning message:
Removed 2 rows containing missing values (geom_point). 
Warning message:
Removed 15560 rows containing missing values (geom_point). 

diffeR documentation built on May 30, 2017, 7:22 a.m.