* using log directory 'd:/Rcompile/CRANpkg/local/4.2/StrucDiv.Rcheck' * using R version 4.2.3 (2023-03-15 ucrt) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: UTF-8 * checking for file 'StrucDiv/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'StrucDiv' version '0.2.1' * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'StrucDiv' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking 'build' directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [24s] OK * checking Rd files ... [1s] OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of 'data' directory ... OK * checking data for non-ASCII characters ... OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking line endings in Makefiles ... OK * checking compilation flags in Makevars ... OK * checking for GNU extensions in Makefiles ... OK * checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK * checking use of PKG_*FLAGS in Makefiles ... OK * checking pragmas in C/C++ headers and code ... OK * checking compiled code ... OK * checking installed files from 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... [11s] OK * checking differences from 'StrucDiv-Ex.Rout' to 'StrucDiv-Ex.Rout.save' ... OK 43,61c43,89 < > ## Not run: < > ##D # Construct a small raster file containing realizations of normal random variables: < > ##D a <- raster::raster(matrix(rnorm(648), 18, 36)) < > ##D raster::plot(a) < > ##D # Calculate contrast: < > ##D contrast_a <- strucDiv(a, wsl = 3, fun = contrast) < > ##D raster::plot(contrast_a) < > ##D < > ##D # Calculate dissimilarity: < > ##D b <- raster::raster(matrix(rnorm(100), 10, 10)) < > ##D raster::plot(b) < > ##D dissim_b <- strucDiv(b, wsl = 5, angle = "horizontal", fun = dissimilarity) < > ##D raster::plot(dissim_b) < > ##D < > ##D # Calculate structural diversity entropy with delta = 2 on NDVI data binned to 15 gray levels < > ##D ndvi.15gl <- raster::raster(ndvi.15gl) < > ##D sde_ndvi15 <- strucDiv(ndvi.15gl, wsl = 3, fun = entropy, delta = 2) < > ##D raster::plot(sde_ndvi15) < > ## End(Not run) --- > > # Construct a small raster file containing realizations of normal random variables: > > a <- raster::raster(matrix(rnorm(648), 18, 36)) > > raster::plot(a) > > # Calculate contrast: > > contrast_a <- strucDiv(a, wsl = 3, fun = contrast, na.handling = na.omit, rank = FALSE) > Extracting values from raster file > Calculating gray level co-occurrence matrix > 0% 10 20 30 40 50 60 70 80 90 100% > [----|----|----|----|----|----|----|----|----|----| > **************************************************| > Calculating horizontal structural diversity > 0% 10 20 30 40 50 60 70 80 90 100% > [----|----|----|----|----|----|----|----|----|----| > **************************************************| > > raster::plot(contrast_a) > > > > # Calculate dissimilarity: > > b <- raster::raster(matrix(rnorm(100), 10, 10)) > > raster::plot(b) > > dissim_b <- strucDiv(b, wsl = 5, dist = 1, angle = "all", fun = dissimilarity, > + na.handling = na.pass, rank = FALSE) > Extracting values from raster file > Calculating gray level co-occurrence matrix > 0% 10 20 30 40 50 60 70 80 90 100% > [----|----|----|----|----|----|----|----|----|----| > **************************************************| > **************************************************************Calculating horizontal structural diversity > 0% 10 20 30 40 50 60 70 80 90 100% > [----|----|----|----|----|----|----|----|----|----| > **************************************************| > **************************************************************> raster::plot(dissim_b) > > > > # Calculate structural diversity entropy with delta = 2 on NDVI data binned to 15 gray levels > > ndvi.15gl <- raster::raster(ndvi.15gl) > > sde_ndvi15 <- strucDiv(ndvi.15gl, wsl = 3, fun = entropy, delta = 2, na.handling = na.pass, > + rank = FALSE) > Extracting values from raster file > Calculating gray level co-occurrence matrix > 0% 10 20 30 40 50 60 70 80 90 100% > [----|----|----|----|----|----|----|----|----|----| > **************************************************| > Calculating horizontal structural diversity > 0% 10 20 30 40 50 60 70 80 90 100% > [----|----|----|----|----|----|----|----|----|----| > **************************************************| > > raster::plot(sde_ndvi15) > > 79,89c107,112 < > ## Not run: < > ##D # Calculate entropy on simulated random patch data < > ##D a <- raster::raster(matrix(rnorm(100), 10, 10)) < > ##D sdivDom <- strucDivDom(a, angle = "vertical", fun = entropyDom) < > ##D # Structural diversity value of the domain < > ##D div <- sdivDom$div < > ##D # Gray level co-occurrence matrix < > ##D glcm <- sdivDom$GLCM < > ##D # Diversity matrix < > ##D divmat <- sdivDom$divMat < > ## End(Not run) --- > > # Calculate entropy on NDVI data binned to 15 gray levels > > ndvi15 <- raster::raster(ndvi.15gl) > > ndvi15Dom <- strucDivDom(ndvi15, fun = entropyDom) > > ndvi15GLCM <- ndvi15Dom$GLCM > > ndvi15Div <- ndvi15Dom$div > > 106,125c129,170 < > ## Not run: < > ##D # Construct a small raster file containing realizations of normal random variables: < > ##D a <- raster::raster(matrix(rnorm(400), 20, 20)) < > ##D raster::plot(a) < > ##D # Calculate structural diversity entropy with delta = 2, double moving window scheme < > ##D sde_1 <- strucDivNest(a, wslI = 3, wslO = 5, angle = "horizontal", fun = entropy, delta = 2) < > ##D raster::plot(sde_1) < > ##D < > ##D # Calculate structural diversity entropy with delta = 1, block nesting scheme < > ##D b <- raster::raster(matrix(rnorm(2500), 50, 50)) < > ##D raster::plot(b) < > ##D sde_b <- strucDivNest(b, wslI = 3, dimB = c(10, 10), oLap = 4, priorB = TRUE, fun = entropy, < > ##D delta = 1) < > ##D raster::plot(sde_b) < > ##D < > ##D # Calculate entropy on simulated random patch, domain nesting scheme < > ##D patch <- raster::raster(patch) < > ##D entropy_patch <- strucDivNest(patch, wslI = 5, domain = TRUE, angle = "vertical", fun = entropy) < > ##D raster::plot(entropy_patch) < > ## End(Not run) --- > > # Construct a small raster file containing realizations of normal random variables: > > a <- raster::raster(matrix(rnorm(648), 18, 36)) > > raster::plot(a) > > # Calculate structural diversity entropy with delta = 2, double moving window scheme > > sde_a <- strucDivNest(a, wslI = 3, wslO = 7, fun = entropy, delta = 2, na.handling = na.omit, > + rank = FALSE) > Extracting values from raster file > Calculating gray level co-occurrence matrix > 0% 10 20 30 40 50 60 70 80 90 100% > [----|----|----|----|----|----|----|----|----|----| > **************************************************| > Calculating horizontal structural diversity > 0% 10 20 30 40 50 60 70 80 90 100% > [----|----|----|----|----|----|----|----|----|----| > **************************************************| > > raster::plot(sde_a) > > > > # Calculate structural diversity entropy with delta = 1, block nesting scheme > > b <- raster::raster(matrix(rnorm(2500), 50, 50)) > > raster::plot(b) > > sde_b <- strucDivNest(b, wslI = 3, dimB = c(10, 10), oLap = 4, priorB = TRUE, fun = entropy, > + delta = 1, na.handling = na.pass, rank = FALSE) > > | > | | 0% > > raster::plot(sde_b) > > > > # Calculate entropy on NDVI data binned to 15 gray levels, domain nesting scheme > > ndvi.15gl <- raster::raster(ndvi.15gl) > > entropyNest_ndvi15 <- strucDivNest(ndvi.15gl, wslI = 5, domain = TRUE, fun = entropy, > + na.handling = na.pass, rank = FALSE) > Extracting values from raster file > Calculating gray level co-occurrence matrix > 0% 10 20 30 40 50 60 70 80 90 100% > [----|----|----|----|----|----|----|----|----|----| > **************************************************| > Calculating horizontal structural diversity > 0% 10 20 30 40 50 60 70 80 90 100% > [----|----|----|----|----|----|----|----|----|----| > **************************************************| > > raster::plot(entropyNest_ndvi15) > > * checking for unstated dependencies in 'tests' ... OK * checking tests ... [12s] OK Running 'testthat.R' [11s] Comparing 'testthat.Rout' to 'testthat.Rout.save' ... OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes in 'inst/doc' ... OK * checking re-building of vignette outputs ... [6s] OK * checking PDF version of manual ... OK * DONE Status: OK