Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] llvm 19 compilation issue #50

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 2 additions & 0 deletions .github/workflows/rhub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ jobs:

steps:
- uses: r-hub/actions/checkout@v1
with:
submodules: true
- uses: r-hub/actions/platform-info@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "src/libgeoda"]
path = src/libgeoda
url = https://github.com/geodacenter/libgeoda
url = https://github.com/geodacenter/libgeoda.git
9 changes: 4 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: rgeoda
Type: Package
Title: R Library for Spatial Data Analysis
Version: 0.0.10-4
Date: 2023-07-01
Version: 0.0.10-7
Date: 2024-10-21
Authors@R:
c(person(given = "Xun", family = "Li", email="[email protected]", role=c("aut","cre")),
person(given = "Luc", family = "Anselin", email="[email protected]", role="aut"))
Expand Down Expand Up @@ -32,9 +32,8 @@ Imports:
sf,
Rcpp (>= 1.0.1)
LinkingTo:
Rcpp,
BH
RoxygenNote: 7.1.1
Rcpp
RoxygenNote: 7.3.2
Encoding: UTF-8
Suggests:
wkb,
Expand Down
4 changes: 4 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ export(min_distthreshold)
export(min_neighbors)
export(natural_breaks)
export(neighbor_match_test)
export(p_GeoDa)
export(p_GeoDaTable)
export(p_GeoDaWeight)
export(p_LISA)
export(percentile_breaks)
export(quantile_breaks)
export(queen_weights)
Expand Down
20 changes: 10 additions & 10 deletions R/clustering.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#' @param bound_variable (optional) A data frame with selected bound variable
#' @param min_bound (optional) A minimum bound value that applies to all
#' clusters
#' @param scale_method One of the scaling methods {'raw', 'standardize',
#' 'demean', 'mad', 'range_standardize', 'range_adjust'} to apply on input data.
#' @param scale_method One of the scaling methods \{'raw', 'standardize',
#' 'demean', 'mad', 'range_standardize', 'range_adjust'\} to apply on input data.

Check warning on line 13 in R/clustering.R

View workflow job for this annotation

GitHub Actions / lint-project

file=R/clustering.R,line=13,col=81,[line_length_linter] Lines should not be more than 80 characters. This line is 81 characters.
#' Default is 'standardize' (Z-score normalization).
#' @param distance_method (optional) The distance method used to compute the
#' distance betwen observation i and j. Defaults to "euclidean". Options are
Expand All @@ -29,17 +29,17 @@
#' guerry_path <- system.file("extdata", "Guerry.shp", package = "rgeoda")
#' guerry <- st_read(guerry_path)
#' queen_w <- queen_weights(guerry)
#' data <- guerry[c('Crm_prs','Crm_prp','Litercy','Donatns','Infants','Suicids')]

Check warning on line 32 in R/clustering.R

View workflow job for this annotation

GitHub Actions / lint-project

file=R/clustering.R,line=32,col=81,[line_length_linter] Lines should not be more than 80 characters. This line is 81 characters.
#' guerry_clusters <- skater(4, queen_w, data)
#' guerry_clusters
#' @export
skater <- function(k, w, df, bound_variable=data.frame(), min_bound=0,

Check warning on line 36 in R/clustering.R

View workflow job for this annotation

GitHub Actions / lint-project

file=R/clustering.R,line=36,col=44,[infix_spaces_linter] Put spaces around all infix operators.

Check warning on line 36 in R/clustering.R

View workflow job for this annotation

GitHub Actions / lint-project

file=R/clustering.R,line=36,col=68,[infix_spaces_linter] Put spaces around all infix operators.
scale_method="standardize", distance_method="euclidean",

Check warning on line 37 in R/clustering.R

View workflow job for this annotation

GitHub Actions / lint-project

file=R/clustering.R,line=37,col=32,[infix_spaces_linter] Put spaces around all infix operators.

Check warning on line 37 in R/clustering.R

View workflow job for this annotation

GitHub Actions / lint-project

file=R/clustering.R,line=37,col=63,[infix_spaces_linter] Put spaces around all infix operators.
random_seed=123456789, cpu_threads=6, rdist=numeric()) {

Check warning on line 38 in R/clustering.R

View workflow job for this annotation

GitHub Actions / lint-project

file=R/clustering.R,line=38,col=31,[infix_spaces_linter] Put spaces around all infix operators.

Check warning on line 38 in R/clustering.R

View workflow job for this annotation

GitHub Actions / lint-project

file=R/clustering.R,line=38,col=54,[infix_spaces_linter] Put spaces around all infix operators.

Check warning on line 38 in R/clustering.R

View workflow job for this annotation

GitHub Actions / lint-project

file=R/clustering.R,line=38,col=63,[infix_spaces_linter] Put spaces around all infix operators.
if (w$num_obs < 1) {
stop("The weights is not valid.")
}
if (k <1 && k > w$num_obs) {

Check warning on line 42 in R/clustering.R

View workflow job for this annotation

GitHub Actions / lint-project

file=R/clustering.R,line=42,col=9,[infix_spaces_linter] Put spaces around all infix operators.
stop("The number of clusters should be a positive integer number, which is
less than the number of observations.")
}
Expand Down Expand Up @@ -89,7 +89,7 @@
#' @param method {"single", "complete", "average","ward"}
#' @param bound_variable (optional) A data frame with selected bound variabl
#' @param min_bound (optional) A minimum bound value that applies to all clusters
#' @param scale_method One of the scaling methods {'raw', 'standardize', 'demean', 'mad', 'range_standardize', 'range_adjust'} to apply on input data. Default is 'standardize' (Z-score normalization).
#' @param scale_method One of the scaling methods \{'raw', 'standardize', 'demean', 'mad', 'range_standardize', 'range_adjust'\} to apply on input data. Default is 'standardize' (Z-score normalization).
#' @param distance_method (optional) The distance method used to compute the distance betwen observation i and j. Defaults to "euclidean". Options are "euclidean" and "manhattan"
#' @param rdist (optional) The distance matrix (lower triangular matrix, column wise storage)
#' @return A names list with names "Clusters", "Total sum of squares", "Within-cluster sum of squares", "Total within-cluster sum of squares", and "The ratio of between to total sum of squares".
Expand Down Expand Up @@ -166,7 +166,7 @@
#' @param method {"firstorder-singlelinkage", "fullorder-completelinkage", "fullorder-averagelinkage","fullorder-singlelinkage", "fullorder-wardlinkage"}
#' @param bound_variable (optional) A data frame with selected bound variabl
#' @param min_bound (optional) A minimum bound value that applies to all clusters
#' @param scale_method (optional) One of the scaling methods {'raw', 'standardize', 'demean', 'mad', 'range_standardize', 'range_adjust'} to apply on input data. Default is 'standardize' (Z-score normalization).
#' @param scale_method (optional) One of the scaling methods \{'raw', 'standardize', 'demean', 'mad', 'range_standardize', 'range_adjust'\} to apply on input data. Default is 'standardize' (Z-score normalization).
#' @param distance_method (optional) The distance method used to compute the distance betwen observation i and j. Defaults to "euclidean". Options are "euclidean" and "manhattan"
#' @param random_seed (int,optional) The seed for random number generator. Defaults to 123456789.
#' @param cpu_threads (optional) The number of cpu threads used for parallel computation
Expand Down Expand Up @@ -238,7 +238,7 @@
#' @param min_bound A minimum value that the sum value of bounding variable int each cluster should be greater than
#' @param iterations (optional): The number of iterations of greedy algorithm. Defaults to 99.
#' @param initial_regions (optional): The initial regions that the local search starts with. Default is empty. means the local search starts with a random process to "grow" clusters
#' @param scale_method (optional) One of the scaling methods {'raw', 'standardize', 'demean', 'mad', 'range_standardize', 'range_adjust'} to apply on input data. Default is 'standardize' (Z-score normalization).
#' @param scale_method (optional) One of the scaling methods \{'raw', 'standardize', 'demean', 'mad', 'range_standardize', 'range_adjust'\} to apply on input data. Default is 'standardize' (Z-score normalization).
#' @param distance_method (optional) The distance method used to compute the distance betwen observation i and j. Defaults to "euclidean". Options are "euclidean" and "manhattan"
#' @param random_seed (optional) The seed for random number generator. Defaults to 123456789.
#' @param cpu_threads (optional) The number of cpu threads used for parallel computation
Expand Down Expand Up @@ -313,7 +313,7 @@
#' @param cooling_rate The cooling rate of a simulated annealing algorithm. Defaults to 0.85
#' @param iterations (optional): The number of iterations of SA algorithm. Defaults to 99.
#' @param sa_maxit (optional): The number of iterations of simulated annealing. Defaults to 1
#' @param scale_method (optional) One of the scaling methods {'raw', 'standardize', 'demean', 'mad', 'range_standardize', 'range_adjust'} to apply on input data. Default is 'standardize' (Z-score normalization).
#' @param scale_method (optional) One of the scaling methods \{'raw', 'standardize', 'demean', 'mad', 'range_standardize', 'range_adjust'\} to apply on input data. Default is 'standardize' (Z-score normalization).
#' @param distance_method (optional) The distance method used to compute the distance betwen observation i and j. Defaults to "euclidean". Options are "euclidean" and "manhattan"
#' @param random_seed (optional) The seed for random number generator. Defaults to 123456789.
#' @param initial_regions (optional): The initial regions that the local search starts with. Default is empty. means the local search starts with a random process to "grow" clusters
Expand Down Expand Up @@ -389,7 +389,7 @@
#' @param tabu_length (optional): The length of a tabu search heuristic of tabu algorithm. Defaults to 10.
#' @param conv_tabu (optional): The number of non-improving moves. Defaults to 10.
#' @param iterations (optional): The number of iterations of Tabu algorithm. Defaults to 99.
#' @param scale_method (optional) One of the scaling methods {'raw', 'standardize', 'demean', 'mad', 'range_standardize', 'range_adjust'} to apply on input data. Default is 'standardize' (Z-score normalization).
#' @param scale_method (optional) One of the scaling methods \{'raw', 'standardize', 'demean', 'mad', 'range_standardize', 'range_adjust'\} to apply on input data. Default is 'standardize' (Z-score normalization).
#' @param distance_method (optional) The distance method used to compute the distance betwen observation i and j. Defaults to "euclidean". Options are "euclidean" and "manhattan"
#' @param random_seed (optional) The seed for random number generator. Defaults to 123456789.
#' @param initial_regions (optional): The initial regions that the local search starts with. Default is empty. means the local search starts with a random process to "grow" clusters
Expand Down Expand Up @@ -462,7 +462,7 @@
#' @param min_bound (optional) A minimum bound value that applies to all clusters
#' @param inits (optional) The number of construction re-runs, which is for ARiSeL "automatic regionalization with initial seed location"
#' @param initial_regions (optional) The initial regions that the local search starts with. Default is empty. means the local search starts with a random process to "grow" clusters
#' @param scale_method (optional) One of the scaling methods {'raw', 'standardize', 'demean', 'mad', 'range_standardize', 'range_adjust'} to apply on input data. Default is 'standardize' (Z-score normalization).
#' @param scale_method (optional) One of the scaling methods \{'raw', 'standardize', 'demean', 'mad', 'range_standardize', 'range_adjust'\} to apply on input data. Default is 'standardize' (Z-score normalization).
#' @param distance_method (optional) The distance method used to compute the distance betwen observation i and j. Defaults to "euclidean". Options are "euclidean" and "manhattan"
#' @param random_seed (optional) The seed for random number generator. Defaults to 123456789.
#' @param rdist (optional) The distance matrix (lower triangular matrix, column wise storage)
Expand Down Expand Up @@ -528,7 +528,7 @@
#' @param min_bound (optional) A minimum bound value that applies to all clusters
#' @param inits (optional) The number of construction re-runs, which is for ARiSeL "automatic regionalization with initial seed location"
#' @param initial_regions (optional) The initial regions that the local search starts with. Default is empty. means the local search starts with a random process to "grow" clusters
#' @param scale_method (optional) One of the scaling methods {'raw', 'standardize', 'demean', 'mad', 'range_standardize', 'range_adjust'} to apply on input data. Default is 'standardize' (Z-score normalization).
#' @param scale_method (optional) One of the scaling methods \{'raw', 'standardize', 'demean', 'mad', 'range_standardize', 'range_adjust'\} to apply on input data. Default is 'standardize' (Z-score normalization).
#' @param distance_method (optional) The distance method used to compute the distance betwen observation i and j. Defaults to "euclidean". Options are "euclidean" and "manhattan"
#' @param random_seed (optional) The seed for random number generator. Defaults to 123456789.
#' @param rdist (optional) The distance matrix (lower triangular matrix, column wise storage)
Expand Down Expand Up @@ -594,7 +594,7 @@
#' @param min_bound (optional) A minimum bound value that applies to all clusters
#' @param inits (optional) The number of construction re-runs, which is for ARiSeL "automatic regionalization with initial seed location"
#' @param initial_regions (optional) The initial regions that the local search starts with. Default is empty. means the local search starts with a random process to "grow" clusters
#' @param scale_method (optional) One of the scaling methods {'raw', 'standardize', 'demean', 'mad', 'range_standardize', 'range_adjust'} to apply on input data. Default is 'standardize' (Z-score normalization).
#' @param scale_method (optional) One of the scaling methods \{'raw', 'standardize', 'demean', 'mad', 'range_standardize', 'range_adjust'\} to apply on input data. Default is 'standardize' (Z-score normalization).
#' @param distance_method (optional) The distance method used to compute the distance betwen observation i and j. Defaults to "euclidean". Options are "euclidean" and "manhattan"
#' @param random_seed (optional) The seed for random number generator. Defaults to 123456789.
#' @param rdist (optional) The distance matrix (lower triangular matrix, column wise storage)
Expand Down
Loading
Loading