diff --git a/R/accuracy.R b/R/accuracy.R index 8a91cbcde192760ac6e0e9d74e4db88701bc37f6..62cf5cdaac414449ef9bef433fbca1009a75dd39 100644 --- a/R/accuracy.R +++ b/R/accuracy.R @@ -58,7 +58,7 @@ #' method "mahalanobis". #' #' @export -#' @family {accuracy functions} +#' @family accuracy functions accuracy <- function(x,...) UseMethod("accuracy", x) @@ -207,7 +207,7 @@ accuracy.DataFrameStack <- function(x, observed, #' @return The value of the mean accuracy after Deutsch (1997); details #' can be found in \code{\link[=precision.accuracy]{precision()}}. #' @export -#' @family {accuracy functions} +#' @family accuracy functions mean.accuracy = function(x, ...){ aux = x$accuracy - x$p mean(ifelse(aux>0,1,0),...) @@ -245,7 +245,7 @@ precision <- function(x,...) UseMethod("precision",x) #' To consider the whole curve, goodness can be used #' \deqn{G = 1-\int_{0}^{1} (\pi_i-p_i)\cdot (3\cdot I\{(\pi_i-p_i)>0\}-2) dp.} #' -#' @family {accuracy functions} +#' @family accuracy functions #' @method precision accuracy #' @export precision.accuracy <- function(x, ...){ @@ -283,7 +283,7 @@ precision.accuracy <- function(x, ...){ #' @export #' @method plot accuracy #' -#' @family {accuracy functions} +#' @family accuracy functions plot.accuracy <- function(x, xlim=c(0,1), ylim=c(0,1), xaxs="i", yaxs="i", type="o", col="red", asp=1, xlab="confidence", ylab="coverage", pty="s", main="accuracy plot", colref=col[1], ...){ @@ -332,7 +332,7 @@ xvErrorMeasures <- function(x,...) UseMethod("xvErrorMeasures", x) #' #' @export #' @method xvErrorMeasures data.frame -#' @family {accuracy functions} +#' @family accuracy functions xvErrorMeasures.data.frame = function(x, observed=x$observed, output="MSDR1", univariate=length(dim(observed))==0, ...){ if(length(output)>1) diff --git a/R/compositionsCompatibility.R b/R/compositionsCompatibility.R index 162c8bbc2b68218cce5ca84f46daedbd26580fbd..73db8ccc66b4f89496922bbf61f9ae9f7b418a26 100644 --- a/R/compositionsCompatibility.R +++ b/R/compositionsCompatibility.R @@ -1043,7 +1043,7 @@ gsi.produceV = function(V=NULL, D=nrow(V), #' of info. If you want to "freeze" your plot, embed your call in another #' call to \code{\link{par}}, e.g. \code{par(variogramModelPlot(...))}. #' @export -#' @family {variogramModelPlot} +#' @family variogramModelPlot #' @method variogramModelPlot logratioVariogram variogramModelPlot.logratioVariogram <- function(vg, model = NULL, # gstat or variogramModelList object containing a variogram model fitted to vg col = rev(rainbow(ndirections(vg))), diff --git a/R/genDiag.R b/R/genDiag.R index 8e6ca3c1f46db1032f8a80fa01a462a74fdfa303..03cacf97a0de174b9441b3bf0868a327c3cf95e1 100644 --- a/R/genDiag.R +++ b/R/genDiag.R @@ -113,7 +113,7 @@ Maf = function(x,...) UseMethod("Maf",x) #' @method Maf data.frame #' @aliases genDiag #' -#' @family {genDiag} +#' @family generalised Diagonalisations #' #' @examples #' require("magrittr") @@ -406,7 +406,7 @@ RJD.rcomp <- RJD.acomp #' @return A data set or compositional object of the nature of the original data #' used for creating the genDiag object. #' @export -#' @family {genDiag} +#' @family generalised Diagonalisations #' @examples #' data("jura", package="gstat") #' juracomp = compositions::acomp(jura.pred[, -(1:6)]) @@ -447,7 +447,7 @@ predict.genDiag = function (object, newdata=NULL, ...) { #' #' @return nothing. Function is called exclusively to produce the plot #' @export -#' @family {genDiag} +#' @family generalised Diagonalisations #' @importFrom compositions coloredBiplot #' @method coloredBiplot genDiag #' diff --git a/R/gmSpatialModel.R b/R/gmSpatialModel.R index 437d4e97c83defd27b4455239f927f1db96964d7..9546f38924e76ae9a2922a6afdc5b8a4839b2f7c 100644 --- a/R/gmSpatialModel.R +++ b/R/gmSpatialModel.R @@ -14,7 +14,7 @@ #' @slot proj4string see [sp::SpatialPointsDataFrame()] #' @slot model gmUnconditionalSpatialModel. Some unconditional geospatial model. It can be NULL. #' @slot parameters gmSpatialMethodParameters. Some method parameters. It can be NULL -#' @family {gmSpatialModel} +#' @family gmSpatialModel #' #' @return You will seldom create the spatial model directly. Use instead the creators `make.gm*` linked below #' @export @@ -62,7 +62,7 @@ setClass("gmSpatialModel", contains="SpatialPointsDataFrame", #' #' @return A "gmSpatialModel" object with all information provided appropriately structured. See [gmSpatialModel-class]. #' @export -#' @family {gmSpatialModel} +#' @family gmSpatialModel #' @seealso [SequentialSimulation()], [TurningBands()] or [CholeskyDecomposition()] for specifying the exact #' simulation method and its parameters, [predict.gmSpatialModel()] for running predictions or simulations #' @@ -118,7 +118,7 @@ make.gmMultivariateGaussianSpatialModel <- function( #' #' @return A "gmSpatialModel" object with all information provided appropriately structured. See [gmSpatialModel-class]. #' @export -#' @family {gmSpatialModel} +#' @family gmSpatialModel #' @seealso [SequentialSimulation()], [TurningBands()] or [CholeskyDecomposition()] for specifying the exact #' simulation method and its parameters, [predict.gmSpatialModel()] for running predictions or simulations #' @@ -179,7 +179,7 @@ make.gmCompositionalGaussianSpatialModel <- function( #' #' @return A "gmSpatialModel" object with all information provided appropriately structured. See [gmSpatialModel-class]. #' @export -#' @family {gmSpatialModel} +#' @family gmSpatialModel #' @seealso [DirectSamplingParameters()] for specifying a direct simulation method parameters, #' [predict.gmSpatialModel()] for running the simulation make.gmCompositionalMPSSpatialModel = function( @@ -328,7 +328,7 @@ as.gstat.gmSpatialModel <- function(object, ...){ #' #' @return The same spatial object re-structured as a "gmSpatialModel", see [gmSpatialModel-class] #' @export -#' @family {gmSpatialModel} +#' @family gmSpatialModel as.gmSpatialModel <- function(object, ...) UseMethod("as.gmSpatialModel", object) #' @describeIn as.gmSpatialModel Recast spatial object to gmSpatialModel format @@ -385,7 +385,7 @@ as.gmSpatialModel.gstat = function(object, V=NULL, ...){ #' direct sampling is available: it can be obtained by providing some parameter object created with a call to #' [DirectSamplingParameters()]. Currently it is also necessary that `newdata` is a gridded set of locations. #' @export -#' @family {gmSpatialModel} +#' @family gmSpatialModel predict.gmSpatialModel <- function(object, newdata=NULL, pars=object@parameters, ...){ # deal with (co)kriging if(is(pars, "gmNeighbourhoodSpecification")){ diff --git a/R/gmValidationStrategy.R b/R/gmValidationStrategy.R index 262a9d7df2cca38ca8cfca260a69e6779b422280..6cfcdda424ef54308c7b8fe9f35d94732bacf08b 100644 --- a/R/gmValidationStrategy.R +++ b/R/gmValidationStrategy.R @@ -17,7 +17,7 @@ #' @return An object, a list with an appropriate class, controlling the strategy specified. #' This can be of class "NfoldCrossValidation" or of class c("LeaveOneOut", "NfoldCrossValidation"). #' @export -#' @family {validation functions} +#' @family validation functions #' #' @examples #' NfoldCrossValidation(nfolds=5, doAll=FALSE) @@ -34,7 +34,7 @@ NfoldCrossValidation = function(nfolds=2, doAll=TRUE, ...){ #' #' @return an object of class c("LeaveOneOut", "NfoldCrossValidation") to be used #' in a call to [validate()] -#' @family {validation functions} +#' @family validation functions #' #' @export #' @examples @@ -59,8 +59,8 @@ LeaveOneOut = function(){ #' @return A data frame of predictions (possibly with kriging variances and covariances, or equivalent #' uncertainty measures) for each element of the validation set #' @export -#' @family {validation functions} -#' @family {accuracy functions} +#' @family validation functions +#' @family accuracy functions #' #' @examples #' data("Windarling") diff --git a/R/gstatCompatibility.R b/R/gstatCompatibility.R index 4c572d197a20ce6838bd82e5a3b416d2f5f3d0cd..e76069f4ce69ddb5dca6eca899fdae5b7b650f87 100644 --- a/R/gstatCompatibility.R +++ b/R/gstatCompatibility.R @@ -159,7 +159,7 @@ getGstatData = function(gg # gstat object #' @importFrom gstat vgm #' @seealso `gstat::plot.gstatVariogram()` #' @method variogramModelPlot gstatVariogram -#' @family {variogramModelPlot} +#' @family variogramModelPlot #' @examples #' data("jura", package="gstat") #' X = jura.pred[,1:2] diff --git a/R/mask.R b/R/mask.R index 6ac6d068f6814da7572ed7383459ca0665d7b4d3..51685164feb6c531a7ebc5d27f8844c6200c390d 100644 --- a/R/mask.R +++ b/R/mask.R @@ -18,7 +18,7 @@ #' analysis. Finally, method 'point2poly' created the mask by taking the points internal #' to a "SpatialPolygon" object (given in \code{x}). #' @export -#' @family {masking} +#' @family masking functions #' #' @examples #' ## with data.frame @@ -188,7 +188,7 @@ gsi.masking.polygon = function(grid, poly){ #' @param x a masked object #' @return The retrieved mask information from `x`, an object of class "mask" #' @export -#' @family {masking} +#' @family masking functions getMask = function(x) UseMethod(generic = "getMask", x) #' @describeIn getMask Get the mask info out of a spatial data object @@ -230,7 +230,7 @@ getMask.SpatialPointsDataFrame = function(x) attr(x@data, "mask") #' #' @return the summary of number of nodes inside/outside the mask #' @export -#' @family {masking} +#' @family masking functions print.mask <- function(x,...){ print("mask active") print(summary(x)) @@ -247,7 +247,7 @@ print.mask <- function(x,...){ #' #' @return The object `x` appropriately masked (for the setter methods). #' @export -#' @family {masking} +#' @family masking functions setMask <- function(x,...) UseMethod("setMask", x) @@ -367,7 +367,7 @@ unmask <- function(x,...) UseMethod("unmask", x) #' in `x` and in `fullgrid` be cross-checked to ensure that they are given in #' compatible orders? See [sortDataInGrid()] and [setGridOrder()] for controlling #' the ordering of vectors and grids. -#' @family {masking} +#' @family masking functions #' @method unmask data.frame #' #' @return The original grid data and extend potential diff --git a/R/variograms.R b/R/variograms.R index db7322743ae9368a82d5aab54db6d93ea82e30c1..a7a4c66bc073ed67f21e1eaa6e7d7398e0c3bc4a 100644 --- a/R/variograms.R +++ b/R/variograms.R @@ -26,7 +26,7 @@ #' h^2 = (\mathbf{x}_i-\mathbf{x}_j)\cdot M^{-1}\cdot (\mathbf{x}_i-\mathbf{x}_j)^t #' } #' is the (square of) the lag distance to be fed into the correlation function. -#' @family {gmCgram} +#' @family gmCgram #' @export #' @aliases vg.Exp vg.exp vg.Exponential vg.Gau vg.gauss #' vg.Gauss vg.Sph vg.sph vg.Spherical gsi.validModels @@ -74,7 +74,7 @@ setCgram = function(type, nugget=sill*0, sill, anisRanges, extraPar=0){ #' is obtained by summing (+) two `gmCgram` objects. #' @export #' @method [[ gmCgram -#' @family {gmCgram} +#' @family gmCgram functions #' @examples #' utils::data("variogramModels") #' v1 = setCgram(type=vg.Gau, sill=diag(2), anisRanges = 3*diag(c(3,1))) @@ -177,7 +177,7 @@ setCgram = function(type, nugget=sill*0, sill, anisRanges, extraPar=0){ #' variogram matrices, use the `[`-notation. #' @export #' @method [ gmCgram -#' @family {gmCgram} +#' @family gmCgram functions #' @examples #' utils::data("variogramModels") #' v1 = setCgram(type=vg.Gau, sill=diag(2), anisRanges = 3*diag(c(3,1))) @@ -209,7 +209,7 @@ setCgram = function(type, nugget=sill*0, sill, anisRanges, extraPar=0){ #' be also valid for the sill). #' @export #' @aliases ncol.gmCgram nrow.gmCgram -#' @family {gmCgram} +#' @family gmCgram functions #' #' @method length gmCgram #' @examples @@ -245,7 +245,7 @@ nrow.gmCgram = function(x) nrow(x$nugget) #' than the geographic dimension of the variogram (i.e. \code{dim(x$M)[3]}). #' @export #' @method as.function gmCgram -#' @family {gmCgram} +#' @family gmCgram functions #' @examples #' utils::data("variogramModels") #' v1 = setCgram(type=vg.Gau, sill=diag(2)+0.5, anisRanges = 2*diag(c(3,0.5))) @@ -292,7 +292,7 @@ predict.gmCgram = function(object, newdata, ...){ #' \code{LMCAnisCompo} (for compositional data) and \code{variogramModelList} #' (as provided by package \code{gstat}). #' @export -#' @family {gmCgram} +#' @family gmCgram functions as.gmCgram <- function(m, ...) UseMethod("as.gmCgram",m) #' @describeIn as.gmCgram Convert theoretical structural functions to gmCgram format @@ -324,7 +324,7 @@ as.gmCgram.default <- function(m,...) m #' If you want to further add stuff to it, better just call \code{plot(x,...)}. The difference #' is only relevant when working with the screen graphical device. #' @export -#' @family {gmCgram} +#' @family gmCgram functions #' @examples #' utils::data("variogramModels") #' v1 = setCgram(type=vg.Gau, sill=diag(3)-0.5, anisRanges = 2*diag(c(3,0.5))) @@ -571,7 +571,7 @@ setGeneric("variogram", function(object,...) standardGeneric("variogram")) #' @return An empirical variogram for the provided data. NOTE: avoid using directly gsi.* functions! They #' represent either internal functions, or preliminary, not fully-tested functions. Use \code{\link{variogram}} instead. #' @export -#' @family {gmEVario} +#' @family gmEVario functions #' #' @examples #' library(gstat) @@ -708,7 +708,7 @@ gsi.EVario2D = function(X,Z,Ff=rep(1, nrow(X)), #' computed along certain distances, recorded in its attributes and retrievable with command #' \code{\link{ndirections}}. #' @export -#' @family {gmEVario} +#' @family gmEVario functions #' #' @examples #' library(gstat) @@ -812,7 +812,7 @@ plot.gmEVario = function(x, xlim.up=NULL, xlim.lo=NULL, vdir.up= NULL, vdir.lo= #' @aliases as.gmEVario.gstatVariogram as.gmEVario.logratioVariogram #' as.gmEVario.logratioVariogramAnisotropy #' -#' @family {gmEVario} +#' @family gmEVario functions as.gmEVario <- function(vgemp,...){ UseMethod("as.gmEVario",vgemp)} as.gmEVario.default <- function(vgemp,...) vgemp @@ -839,7 +839,9 @@ variogramModelPlot <- function(vg, ...) UseMethod("variogramModelPlot", vg) #' of info. If you want to "freeze" your plot, embed your call in another #' call to \code{\link{par}}, e.g. \code{par(variogramModelPlot(...))}. #' @export -#' @family {variogramModelPlot} {gmEVario} {gmCgram} +#' @family variogramModelPlot +#' @family gmEVario functions +#' @family gmCgram functions #' @seealso [logratioVariogram()] #' @method variogramModelPlot gmEVario #' @@ -912,7 +914,8 @@ variogramModelPlot.gmEVario <- function(vg, model = NULL, # gstat or variogra #' @return Generic function. It provides the #' number of directions at which an empirical variogram was computed #' @export -#' @family {gmEVario} {gmCgram} +#' @family gmEVario functions +#' @family gmCgram functions #' @seealso [logratioVariogram()], [gstat::variogram()] ndirections <- function(x){ UseMethod("ndirections", x) } ndirections.default = function(x) nrow(x)