Skip to content

Commit

Permalink
update r script in sshicm pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
SpatLyu committed Dec 17, 2024
1 parent d3cd7b2 commit 7fe3a36
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 1 addition & 3 deletions R/sshic.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
#' baltim = sf::read_sf(system.file("extdata/baltim.gpkg",package = "sshicm"))
#' sshic(baltim$PRICE,baltim$DWELL)
#' }
sshic = \(d, s, seed = 42,
permutation_number = 999,
bin_method = "Sturges") {
sshic = \(d, s, seed = 42, permutation_number = 999, bin_method = "Sturges") {
s = as.integer(as.factor(s))
res = IC_SSHICM(d,s,seed,permutation_number,bin_method)
names(res) = c("Ic","Pv")
Expand Down
3 changes: 1 addition & 2 deletions R/sshin.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
#' cinc = sf::read_sf(system.file("extdata/cinc.gpkg",package = "sshicm"))
#' sshin(cinc$THEFT_D,cinc$MALE)
#' }
sshin = \(d, s, seed = 42,
permutation_number = 999) {
sshin = \(d, s, seed = 42, permutation_number = 999) {
d = as.integer(as.factor(d))
s = as.integer(as.factor(s))
res = IN_SSHICM(d,s,seed,permutation_number)
Expand Down
3 changes: 3 additions & 0 deletions R/zzz.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.onLoad = function(...) {
loadNamespace("Rcpp")
}

0 comments on commit 7fe3a36

Please sign in to comment.