Skip to content

Commit

Permalink
unsing CRAN GPSeqClus
Browse files Browse the repository at this point in the history
  • Loading branch information
dsjohnson committed Oct 8, 2023
1 parent 10e2321 commit 06ed02a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Empty file modified R/RcppExports.R
100755 → 100644
Empty file.
6 changes: 4 additions & 2 deletions R/cu_GPSeq_clus.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
#' @export
cu_GPSeq_clus <- function(dat, search_radius_m, window_days, clus_min_locs = 2,
centroid_calc = "mean", show_plots = c(FALSE, "mean"), scale_plot_clus = TRUE,
store_plots = FALSE, season_breaks_jul = NA, daylight_hrs = NA){
store_plots = FALSE,
season_breaks_jul = NA, daylight_hrs = NA){

data <- AID <- TelemDate <- datetime <- y <- point_id <- sfg_id <- . <- .data <- x <- NULL

Expand All @@ -55,7 +56,8 @@ cu_GPSeq_clus <- function(dat, search_radius_m, window_days, clus_min_locs = 2,
clus <- try(suppressWarnings(
GPSeqClus::GPSeq_clus(dat=dat,search_radius_m=search_radius_m, window_days=window_days, clus_min_locs=clus_min_locs,
centroid_calc=centroid_calc, show_plots=show_plots, scale_plot_clus=scale_plot_clus,
store_plots=store_plots, season_breaks_jul=season_breaks_jul, daylight_hrs=daylight_hrs)
store_plots=store_plots,
season_breaks_jul=season_breaks_jul, daylight_hrs=daylight_hrs)
), silent=TRUE)
if(!inherits(clus,"try-error")){
clus <- clus[[1]] |> rename(datetime=TelemDate) |> st_as_sf(coords=c("Long","Lat"), crs=4326) |>
Expand Down

0 comments on commit 06ed02a

Please sign in to comment.