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

Example not reproducible #46

Open
JosiahParry opened this issue Apr 17, 2024 · 0 comments
Open

Example not reproducible #46

JosiahParry opened this issue Apr 17, 2024 · 0 comments

Comments

@JosiahParry
Copy link

JosiahParry commented Apr 17, 2024

The join_count_ratio() function doc is not reproducible. This probably wasn't captured because the tests are wrapped in a \donttrun{} (and I can't tell why? this example contains fully valid R code)

The correct example code is:

library(sf)
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')]
clusters <- skater(5, queen_w, data)
results <- join_count_ratio(clusters$Clusters, queen_w)

results

rgeoda/R/clustering.R

Lines 696 to 706 in 94c17da

#' \dontrun{
#' library(sf)
#' 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')]
#' clusters <- skater(5, queen_w, data)
#' results <- join_count_ratio(clusters, queen_w)
#' results
#' }
#' @export

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant