Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

implement s4 genericslm for spatial logistic map method#609

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
SpatLyu merged 7 commits intostscl:mainfromSpatLyu:v2.0
Jun 6, 2025
Merged
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
document parameters for s4 generics in spatial logistic map methods
  • Loading branch information
@SpatLyu
SpatLyu committedJun 6, 2025
commit7a90de1284dbb7b7af708c732f8e4e0244212cd1
37 changes: 37 additions & 0 deletionsR/slm.R
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,3 +22,40 @@ methods::setGeneric("slm", function(data, ...) standardGeneric("slm"))
return(lapply(RcppSLMTri4Grid(mx,my,mz,k,step,alpha_x,alpha_y,alpha_z,beta_xy,beta_xz,beta_yx,beta_yz,beta_zx,beta_zy,threshold),
\(.x) apply(.x,1,mean,na.rm = TRUE)))
}

#' spatial logistic map
#'
#' @param data observation data.
#' @param x first spatial variable.
#' @param y (optional) second spatial variable.
#' @param z (optional) third spatial variable.
#' @param k (optional) number of neighbors to used.
#' @param step (optional) number of simulation time steps.
#' @param alpha_x (optional) growth parameter for x.
#' @param alpha_y (optional) growth parameter for y.
#' @param alpha_z (optional) growth parameter for y.
#' @param beta_xy (optional) cross-inhibition from x to y.
#' @param beta_xz (optional) cross-inhibition from x to z.
#' @param beta_yx (optional) cross-inhibition from y to x.
#' @param beta_yz (optional) cross-inhibition from y to z.
#' @param beta_zx (optional) cross-inhibition from z to x.
#' @param beta_zy (optional) cross-inhibition from z to y.
#' @param threshold (optional) set to `NaN` if the absolute value exceeds this threshold.
#'
#' @return A list
#' @export
#'
#' @name slm
#' @rdname slm
#' @aliases slm,sf-method
#' @references
#' Willeboordse, F.H., The spatial logistic map as a simple prototype for spatiotemporal chaos, Chaos, 533–540 (2003).
#'
#' @examples
#' columbus = sf::read_sf(system.file("case/columbus.gpkg", package="spEDM"))
#' slm(columbus,"inc")
#'
methods::setMethod("slm", "sf", .slm_sf_method)

#' @rdname slm
methods::setMethod("slm", "SpatRaster", .slm_spatraster_method)

[8]ページ先頭

©2009-2025 Movatter.jp