Skip to content
Snippets Groups Projects
Commit 11d10355 authored by Raimon Tolosana-Delgado's avatar Raimon Tolosana-Delgado
Browse files

export of turning bands

parent b0ae0361
No related branches found
No related tags found
No related merge requests found
Package: gmGeostats Package: gmGeostats
Version: 0.10-7 Version: 0.10-7.9003
Date: 2020-09-28 Date: 2020-10-05
Title: Geostatistics for Compositional Analysis Title: Geostatistics for Compositional Analysis
Authors@R: c(person(given = "Raimon", Authors@R: c(person(given = "Raimon",
family = "Tolosana-Delgado", family = "Tolosana-Delgado",
......
...@@ -177,6 +177,7 @@ export(gridOrder_gstat) ...@@ -177,6 +177,7 @@ export(gridOrder_gstat)
export(gridOrder_sp) export(gridOrder_sp)
export(gsi.DS) export(gsi.DS)
export(gsi.EVario2D) export(gsi.EVario2D)
export(gsi.TurningBands)
export(gsi.gstatCokriging2compo) export(gsi.gstatCokriging2compo)
export(gsi.gstatCokriging2rmult) export(gsi.gstatCokriging2rmult)
export(gsi.produceV) export(gsi.produceV)
......
# gmGeostats 0.10.7.9003
* (2021-04-08) exported turning bands for direct usage
* (2020-10-01) bug in turning bands spherical variogram corrected
# gmGeostats 0.10.7 # gmGeostats 0.10.7
* (2020-09-27) updated references in generalised diagonalisations; improved/reimplemented `as.logratioVariogram()` and `as.logratioVariogramAnisotropy()` methods; minor edits at `plot.logratioVariogramAnisotropy()` and `variogramModelPlot.logratioVariogram()` * (2020-09-27) updated references in generalised diagonalisations; improved/reimplemented `as.logratioVariogram()` and `as.logratioVariogramAnisotropy()` methods; minor edits at `plot.logratioVariogramAnisotropy()` and `variogramModelPlot.logratioVariogram()`
......
...@@ -87,6 +87,7 @@ gsi.calcCgram <- function(X,Y,vgram,ijEqual=FALSE) { ...@@ -87,6 +87,7 @@ gsi.calcCgram <- function(X,Y,vgram,ijEqual=FALSE) {
#' #'
#' @return an array with (npoint, nvar, nsim)-elements, being npoint=nrow(X) #' @return an array with (npoint, nvar, nsim)-elements, being npoint=nrow(X)
#' and nvar = nr of variables in vgram #' and nvar = nr of variables in vgram
#' @export
#' @useDynLib gmGeostats CMVTurningBands #' @useDynLib gmGeostats CMVTurningBands
gsi.TurningBands <- function(X,vgram,nBands,nsim=NULL) { gsi.TurningBands <- function(X,vgram,nBands,nsim=NULL) {
# checks and preps # checks and preps
......
...@@ -249,7 +249,7 @@ gsi.DS4CoDa <- function(n, f, t, n_realiz, nx_TI, ny_TI, nx_SimGrid, ny_SimGrid, ...@@ -249,7 +249,7 @@ gsi.DS4CoDa <- function(n, f, t, n_realiz, nx_TI, ny_TI, nx_SimGrid, ny_SimGrid,
#' image_cokriged(SimGrid, ivar="V1", breaks=o1$breaks, col=o1$col) #' image_cokriged(SimGrid, ivar="V1", breaks=o1$breaks, col=o1$col)
#' image_cokriged(SimGrid, ivar="V2", breaks=o2$breaks, col=o2$col) #' image_cokriged(SimGrid, ivar="V2", breaks=o2$breaks, col=o2$col)
#' image_cokriged(SimGrid, ivar="mask", breaks=c(-0.0001, 0.5, 1.001)) #' image_cokriged(SimGrid, ivar="mask", breaks=c(-0.0001, 0.5, 1.001))
#' res = gsi.DS(n=5, f=0.75, t=0.05, n_realiz=2, dim_TI=c(10,7), dim_SimGrid=c(10,7), #' res = gsi.DS(n=5, f=0.75, t=0.05, n_realiz=100, dim_TI=c(10,7), dim_SimGrid=c(10,7),
#' TI_input=as.matrix(TI_input), SimGrid_input=as.matrix(SimGrid), #' TI_input=as.matrix(TI_input), SimGrid_input=as.matrix(SimGrid),
#' ivars_TI = c("V1", "V2"), SimGrid_mask="mask", invertMask=TRUE) #' ivars_TI = c("V1", "V2"), SimGrid_mask="mask", invertMask=TRUE)
#' image_cokriged(cbind(xy_TI, getStackElement(res,1)), ivar="V1", breaks=o1$breaks, col=o1$col) #' image_cokriged(cbind(xy_TI, getStackElement(res,1)), ivar="V1", breaks=o1$breaks, col=o1$col)
......
...@@ -200,6 +200,7 @@ setClassUnion(name="GridOrNothing", members = c("NULL", "GridTopology")) ...@@ -200,6 +200,7 @@ setClassUnion(name="GridOrNothing", members = c("NULL", "GridTopology"))
.onLoad <- function(libname, pkgname){ .onLoad <- function(libname, pkgname){
## set package options ---- ## set package options ----
# grid organisation # grid organisation
gridOrder = list(refpoint="topleft", cycle=1:2) gridOrder = list(refpoint="topleft", cycle=1:2)
...@@ -215,7 +216,8 @@ setClassUnion(name="GridOrNothing", members = c("NULL", "GridTopology")) ...@@ -215,7 +216,8 @@ setClassUnion(name="GridOrNothing", members = c("NULL", "GridTopology"))
invisible() invisible()
} }
.onUnload <- function(libname, pkgname){ .onUnload <- function(libpath){
library.dynam.unload("gmGeostats", libpath)
## remove package options ---- ## remove package options ----
options(gmGeostats=NULL) options(gmGeostats=NULL)
......
...@@ -857,6 +857,14 @@ extern void anaBackwardC(const int *dimX, ...@@ -857,6 +857,14 @@ extern void anaBackwardC(const int *dimX,
/* ======================================
* EXPORT FUNCTIONS TO R
* ======================================
*/
static R_CMethodDef cMethods[] = { static R_CMethodDef cMethods[] = {
{"CcalcCgram", (DL_FUNC) &CcalcCgram, 15, CcalcCgram_t}, {"CcalcCgram", (DL_FUNC) &CcalcCgram, 15, CcalcCgram_t},
{"CMVTurningBands", (DL_FUNC) &CMVTurningBands, 11, CMVTurningBands_t}, {"CMVTurningBands", (DL_FUNC) &CMVTurningBands, 11, CMVTurningBands_t},
...@@ -866,11 +874,19 @@ static R_CMethodDef cMethods[] = { ...@@ -866,11 +874,19 @@ static R_CMethodDef cMethods[] = {
{NULL, NULL, 0} {NULL, NULL, 0}
}; };
//{"CMVTurningBands2", (DL_FUNC) &CMVTurningBands2, 11, CMVTurningBands2_t},
void R_init_compositions(DllInfo *info) /*
void R_init_gmGeostats(DllInfo *info)
{ {
R_registerRoutines(info, cMethods, NULL, NULL, NULL); R_registerRoutines(info, cMethods, NULL, NULL, NULL);
R_useDynamicSymbols(info, FALSE); R_useDynamicSymbols(info, FALSE);
R_forceSymbols(info, TRUE); R_forceSymbols(info, TRUE);
} }
*/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment