Skip to content

Commit

Permalink
fix docu
Browse files Browse the repository at this point in the history
  • Loading branch information
bleutner committed Oct 6, 2016
1 parent 9394b02 commit 51ae407
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
14 changes: 8 additions & 6 deletions R/pifMatch.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#' }
#' @export
#' @examples
#' library(gridExtra)
#' library(raster)
#'
#' ## Import Landsat example data
Expand All @@ -41,17 +40,20 @@
#' lsat_b <- log(lsat)
#' ## Run pifMatch and return similarity layer, invariant features mask and models
#' lsat_b_adj <- pifMatch(lsat_b, lsat, returnPifMap = TRUE, returnSimMap = TRUE, returnModels = TRUE)
#' grid.arrange(
#' ggR(lsat_b_adj$simMap, geom_raster = TRUE) ,
#' ggR(lsat_b_adj$pifMap),
#' ncol=2)
#'
#' ## Pixelwise similarity
#' ggR(lsat_b_adj$simMap, geom_raster = TRUE)
#'
#' ## Pesudo invariant feature mask
#' ggR(lsat_b_adj$pifMap)
#'
#' ## Histograms of changes
#' par(mfrow=c(1,3))
#' hist(lsat_b[[1]], main = "lsat_b")
#' hist(lsat[[1]], main = "reference")
#' hist(lsat_b_adj$img[[1]], main = "lsat_b adjusted")
#'
#' ## Model summary for first band
#' ## Model summary for first band
#' summary(lsat_b_adj$models[[1]])
pifMatch <- function(img, ref, method = "cor", quantile = 0.95, returnPifMap = TRUE, returnSimMap = TRUE, returnModels = FALSE){
if(nlayers(img)!=nlayers(ref) | nlayers(img) <= 1) stop("Both images need at least two corresponding bands and must have the same number of bands.", call.=FALSE)
Expand Down
14 changes: 8 additions & 6 deletions man/pifMatch.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 51ae407

Please sign in to comment.