Skip to content

Commit

Permalink
version 16.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dnychka authored and cran-robot committed Jun 28, 2024
1 parent 8858bc1 commit 800e82d
Show file tree
Hide file tree
Showing 297 changed files with 1,492 additions and 1,039 deletions.
16 changes: 8 additions & 8 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: fields
Version: 15.2
Date: 2023-08-17
Version: 16.2
Date: 2024-06-27
Title: Tools for Spatial Data
Authors@R: c( person("Douglas", "Nychka", role = c("aut", "cre"),
email = "douglasnychka@gmail.com"),
Expand All @@ -13,9 +13,9 @@ Authors@R: c( person("Douglas", "Nychka", role = c("aut", "cre"),
person("Florian", "Gerber", role = "aut",
email = "flora.fauna.gerber@gmail.com"),
person("Matthew", "Iverson", role = "aut",
email = "miverson@mymail.mines.edu"),
person("University Corporation for Atmospheric Research",
role="cph", email="nychka@ucar.edu")
email = "miverson@mines.edu"),
person("Rider", "Johnson", role = "aut",
email = "riderjohnson.mines.edu")
)
Maintainer: Douglas Nychka <douglasnychka@gmail.com>
Description: For curve, surface and function fitting with an emphasis
Expand Down Expand Up @@ -48,12 +48,12 @@ Depends: R (>= 3.5.0), methods, spam, viridisLite
Imports: maps
NeedsCompilation: yes
Repository: CRAN
Packaged: 2023-08-17 14:57:28 UTC; nychka
Packaged: 2024-06-27 20:13:47 UTC; nychka
Author: Douglas Nychka [aut, cre],
Reinhard Furrer [aut],
John Paige [aut],
Stephan Sain [aut],
Florian Gerber [aut],
Matthew Iverson [aut],
University Corporation for Atmospheric Research [cph]
Date/Publication: 2023-08-17 21:02:31 UTC
Rider Johnson [aut]
Date/Publication: 2024-06-27 21:10:02 UTC
587 changes: 296 additions & 291 deletions MD5

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions R/BD.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# fields is a package for analysis of spatial data written for
# the R software environment.
# Copyright (C) 2022 Colorado School of Mines
# Copyright (C) 2024 Colorado School of Mines
# 1500 Illinois St., Golden, CO 80401
# Contact: Douglas Nychka, douglasnychka@gmail.edu,
# Contact: Douglas Nychka, douglasnychka@gmail.com,
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 2 additions & 2 deletions R/ChicagoO3.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# fields is a package for analysis of spatial data written for
# the R software environment.
# Copyright (C) 2022 Colorado School of Mines
# Copyright (C) 2024 Colorado School of Mines
# 1500 Illinois St., Golden, CO 80401
# Contact: Douglas Nychka, douglasnychka@gmail.edu,
# Contact: Douglas Nychka, douglasnychka@gmail.com,
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
28 changes: 16 additions & 12 deletions R/Exponential.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# fields is a package for analysis of spatial data written for
# the R software environment.
# Copyright (C) 2022 Colorado School of Mines
# Copyright (C) 2024 Colorado School of Mines
# 1500 Illinois St., Golden, CO 80401
# Contact: Douglas Nychka, douglasnychka@gmail.edu,
# Contact: Douglas Nychka, douglasnychka@gmail.com,
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand All @@ -19,25 +19,29 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# or see http://www.r-project.org/Licenses/GPL-2
##END HEADER
"Exponential" <- function(d, range = 1, alpha = 1/range, phi = 1.0,
theta=NULL) {
"Exponential" <- function(d, aRange=1.0, phi = 1.0,
theta=NULL, range=NULL) {
#
# Matern covariance function transcribed from Stein's book page 31
# nu==smoothness==.5, alpha == 1/range
#
# GeoR parameters map to kappa==smoothness and phi == range
# to make old code from Fuentes and also the package SEHmodel
# to make old code from Fuentes and also the package SEHmodel work
# phi is accepted as the marginal variance of the process (see below)
# within fields this parameter is "sigma"

#
# within fields this parameter is "sigma2" and is a standard notation
#
# check for negative distances
# theta argument has been depreciated.
if( !is.null( theta)){
aRange<- theta
#
# fill in other arguments as aRange.
# Note that the theta argument has been depreciated.
if( !is.null(theta)){
aRange<- theta
}
if( !is.null(range)){
aRange<- range
}
if (any(d < 0))
stop("distance argument must be nonnegative")
#
return(phi*exp(-d * alpha))
return(phi*exp(-d/aRange))
}
4 changes: 2 additions & 2 deletions R/ExponentialUpper.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# fields is a package for analysis of spatial data written for
# the R software environment.
# Copyright (C) 2022 Colorado School of Mines
# Copyright (C) 2024 Colorado School of Mines
# 1500 Illinois St., Golden, CO 80401
# Contact: Douglas Nychka, douglasnychka@gmail.edu,
# Contact: Douglas Nychka, douglasnychka@gmail.com,
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 2 additions & 2 deletions R/Krig.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# fields is a package for analysis of spatial data written for
# the R software environment.
# Copyright (C) 2022 Colorado School of Mines
# Copyright (C) 2024 Colorado School of Mines
# 1500 Illinois St., Golden, CO 80401
# Contact: Douglas Nychka, douglasnychka@gmail.edu,
# Contact: Douglas Nychka, douglasnychka@gmail.com,
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
11 changes: 8 additions & 3 deletions R/Krig.family.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# fields is a package for analysis of spatial data written for
# the R software environment.
# Copyright (C) 2022 Colorado School of Mines
# Copyright (C) 2024 Colorado School of Mines
# 1500 Illinois St., Golden, CO 80401
# Contact: Douglas Nychka, douglasnychka@gmail.edu,
# Contact: Douglas Nychka, douglasnychka@gmail.com,
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -141,7 +141,8 @@ Krig.check.xY <- function(x, Y, Z, weights, na.rm,
#
if (out$decomp == "WBW") {
# pad u with zeroes that corresond to null space basis functions
# this makes it compatible with the DR decomposition.
# this makes it compatible with the Demmler Reisch decomposition.
# from an older version of this code
u <- rbind(matrix(0, nrow = out$nt, ncol = ndata), t(out$matrices$V) %*%
qr.q2ty(out$matrices$qr.T, out$W2 %d*% temp.yM))
#
Expand Down Expand Up @@ -179,6 +180,9 @@ Krig.check.xY <- function(x, Y, Z, weights, na.rm,
tauHat.pure.error = out2$tauHat.pure.error, pure.ss = out2$pure.ss))
}

# brute force way to find the smoother matrix:
# yhat = A(lambda) y
# trace of A(lambda) is the effective degrees of freedom
Krig.Amatrix <- function(object, x0 = object$x, lambda = NULL,
eval.correlation.model = FALSE, ...) {
if (is.null(lambda)) {
Expand All @@ -202,6 +206,7 @@ Krig.Amatrix <- function(object, x0 = object$x, lambda = NULL,
}
return(out)
}

"Krig.df.to.lambda" <- function(df, D, guess = 1,
tol = 1e-05) {
if (is.list(D)) {
Expand Down
4 changes: 2 additions & 2 deletions R/KrigFindLambda.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# fields is a package for analysis of spatial data written for
# the R software environment.
# Copyright (C) 2022 Colorado School of Mines
# Copyright (C) 2024 Colorado School of Mines
# 1500 Illinois St., Golden, CO 80401
# Contact: Douglas Nychka, douglasnychka@gmail.edu,
# Contact: Douglas Nychka, douglasnychka@gmail.com,
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 2 additions & 2 deletions R/Matern.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# fields is a package for analysis of spatial data written for
# the R software environment.
# Copyright (C) 2022 Colorado School of Mines
# Copyright (C) 2024 Colorado School of Mines
# 1500 Illinois St., Golden, CO 80401
# Contact: Douglas Nychka, douglasnychka@gmail.edu,
# Contact: Douglas Nychka, douglasnychka@gmail.com,
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 2 additions & 2 deletions R/Matern.parameters.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# fields is a package for analysis of spatial data written for
# the R software environment.
# Copyright (C) 2022 Colorado School of Mines
# Copyright (C) 2024 Colorado School of Mines
# 1500 Illinois St., Golden, CO 80401
# Contact: Douglas Nychka, douglasnychka@gmail.edu,
# Contact: Douglas Nychka, douglasnychka@gmail.com,
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 2 additions & 2 deletions R/Paciorek.cov.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# fields is a package for analysis of spatial data written for
# the R software environment.
# Copyright (C) 2022 Colorado School of Mines
# Copyright (C) 2024 Colorado School of Mines
# 1500 Illinois St., Golden, CO 80401
# Contact: Douglas Nychka, douglasnychka@gmail.edu,
# Contact: Douglas Nychka, douglasnychka@gmail.com,
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 2 additions & 2 deletions R/QSreg.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# fields is a package for analysis of spatial data written for
# the R software environment.
# Copyright (C) 2022 Colorado School of Mines
# Copyright (C) 2024 Colorado School of Mines
# 1500 Illinois St., Golden, CO 80401
# Contact: Douglas Nychka, douglasnychka@gmail.edu,
# Contact: Douglas Nychka, douglasnychka@gmail.com,
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 2 additions & 2 deletions R/QTps.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# fields is a package for analysis of spatial data written for
# the R software environment.
# Copyright (C) 2022 Colorado School of Mines
# Copyright (C) 2024 Colorado School of Mines
# 1500 Illinois St., Golden, CO 80401
# Contact: Douglas Nychka, douglasnychka@gmail.edu,
# Contact: Douglas Nychka, douglasnychka@gmail.com,
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 2 additions & 2 deletions R/RMprecip.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# fields is a package for analysis of spatial data written for
# the R software environment.
# Copyright (C) 2022 Colorado School of Mines
# Copyright (C) 2024 Colorado School of Mines
# 1500 Illinois St., Golden, CO 80401
# Contact: Douglas Nychka, douglasnychka@gmail.edu,
# Contact: Douglas Nychka, douglasnychka@gmail.com,
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 2 additions & 2 deletions R/RadialBasis.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# fields is a package for analysis of spatial data written for
# the R software environment.
# Copyright (C) 2022 Colorado School of Mines
# Copyright (C) 2024 Colorado School of Mines
# 1500 Illinois St., Golden, CO 80401
# Contact: Douglas Nychka, douglasnychka@gmail.edu,
# Contact: Douglas Nychka, douglasnychka@gmail.com,
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 2 additions & 2 deletions R/RdistEarth.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# fields is a package for analysis of spatial data written for
# the R software environment.
# Copyright (C) 2022 Colorado School of Mines
# Copyright (C) 2024 Colorado School of Mines
# 1500 Illinois St., Golden, CO 80401
# Contact: Douglas Nychka, douglasnychka@gmail.edu,
# Contact: Douglas Nychka, douglasnychka@gmail.com,
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 2 additions & 2 deletions R/SUBSCRIPTINGSpatialDesign.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# fields is a package for analysis of spatial data written for
# the R software environment.
# Copyright (C) 2022 Colorado School of Mines
# Copyright (C) 2024 Colorado School of Mines
# 1500 Illinois St., Golden, CO 80401
# Contact: Douglas Nychka, douglasnychka@gmail.edu,
# Contact: Douglas Nychka, douglasnychka@gmail.com,
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 2 additions & 2 deletions R/Tps.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# fields is a package for analysis of spatial data written for
# the R software environment.
# Copyright (C) 2022 Colorado School of Mines
# Copyright (C) 2024 Colorado School of Mines
# 1500 Illinois St., Golden, CO 80401
# Contact: Douglas Nychka, douglasnychka@gmail.edu,
# Contact: Douglas Nychka, douglasnychka@gmail.com,
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 2 additions & 2 deletions R/US.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# fields is a package for analysis of spatial data written for
# the R software environment.
# Copyright (C) 2022 Colorado School of Mines
# Copyright (C) 2024 Colorado School of Mines
# 1500 Illinois St., Golden, CO 80401
# Contact: Douglas Nychka, douglasnychka@gmail.edu,
# Contact: Douglas Nychka, douglasnychka@gmail.com,
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 2 additions & 2 deletions R/add.image.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# fields is a package for analysis of spatial data written for
# the R software environment.
# Copyright (C) 2022 Colorado School of Mines
# Copyright (C) 2024 Colorado School of Mines
# 1500 Illinois St., Golden, CO 80401
# Contact: Douglas Nychka, douglasnychka@gmail.edu,
# Contact: Douglas Nychka, douglasnychka@gmail.com,
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 2 additions & 2 deletions R/addColorBarTriangle.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# fields is a package for analysis of spatial data written for
# the R software environment.
# Copyright (C) 2022 Colorado School of Mines
# Copyright (C) 2024 Colorado School of Mines
# 1500 Illinois St., Golden, CO 80401
# Contact: Douglas Nychka, douglasnychka@gmail.edu,
# Contact: Douglas Nychka, douglasnychka@gmail.com,
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 2 additions & 2 deletions R/addLegend.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# fields is a package for analysis of spatial data written for
# the R software environment.
# Copyright (C) 2022 Colorado School of Mines
# Copyright (C) 2024 Colorado School of Mines
# 1500 Illinois St., Golden, CO 80401
# Contact: Douglas Nychka, douglasnychka@gmail.edu,
# Contact: Douglas Nychka, douglasnychka@gmail.com,
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 2 additions & 2 deletions R/addMarginsGridList.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# fields is a package for analysis of spatial data written for
# the R software environment.
# Copyright (C) 2022 Colorado School of Mines
# Copyright (C) 2024 Colorado School of Mines
# 1500 Illinois St., Golden, CO 80401
# Contact: Douglas Nychka, douglasnychka@gmail.edu,
# Contact: Douglas Nychka, douglasnychka@gmail.com,
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 2 additions & 2 deletions R/arrow.plot.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# fields is a package for analysis of spatial data written for
# the R software environment.
# Copyright (C) 2022 Colorado School of Mines
# Copyright (C) 2024 Colorado School of Mines
# 1500 Illinois St., Golden, CO 80401
# Contact: Douglas Nychka, douglasnychka@gmail.edu,
# Contact: Douglas Nychka, douglasnychka@gmail.com,
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 2 additions & 2 deletions R/as.image.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# fields is a package for analysis of spatial data written for
# the R software environment.
# Copyright (C) 2022 Colorado School of Mines
# Copyright (C) 2024 Colorado School of Mines
# 1500 Illinois St., Golden, CO 80401
# Contact: Douglas Nychka, douglasnychka@gmail.edu,
# Contact: Douglas Nychka, douglasnychka@gmail.com,
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
Loading

0 comments on commit 800e82d

Please sign in to comment.