Skip to content

Commit

Permalink
fix: prevent terra namespace conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
jiajic committed Oct 26, 2024
1 parent 9bf8d53 commit 84eaf28
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ importFrom(methods,validObject)
importFrom(utils,.DollarNames)
importMethodsFrom(Matrix,t)
importMethodsFrom(terra,"ext<-")
importMethodsFrom(terra,area)
importMethodsFrom(terra,as.data.frame)
importMethodsFrom(terra,as.points)
importMethodsFrom(terra,as.polygons)
Expand Down
4 changes: 3 additions & 1 deletion R/generics.R
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ setGeneric("affine", function(x, y, ...) standardGeneric("affine"))
setGeneric("shear", function(x, ...) standardGeneric("shear"))
setGeneric("XY", function(x, ...) standardGeneric("XY"))
setGeneric("XY<-", function(x, ..., value) standardGeneric("XY<-"))
setGeneric("area", function(x, ...) standardGeneric("area"))
if (!isGeneric("area")) {
setGeneric("area", function(x, ...) standardGeneric("area"))
}

# Methods and documentations found in methods-overlaps.R
setGeneric("overlaps", function(x, ...) standardGeneric("overlaps"))
Expand Down
1 change: 1 addition & 0 deletions R/package_imports.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#' @importMethodsFrom terra nrow ncol
#' @importMethodsFrom terra hist density
#' @importClassesFrom terra SpatExtent SpatVector
#' @importMethodsFrom terra area
#' @import GiottoUtils
#' @import data.table
#' @import utils
Expand Down

0 comments on commit 84eaf28

Please sign in to comment.