Skip to content

Commit

Permalink
small bug correction in the summary function
Browse files Browse the repository at this point in the history
  • Loading branch information
eldarrak committed Oct 16, 2023
1 parent 74ea601 commit 4e08bea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions CRAN-SUBMISSION
@@ -1,3 +1,3 @@
Version: 0.5.3
Date: 2023-09-05 12:27:28 UTC
SHA: a33ae33d5cd60f082814baaacbb210f041fc8792
Version: 0.5.4
Date: 2023-10-02 20:10:24 UTC
SHA: 74ea6014e2209f2bbca06e8d97298a540d14f51d
2 changes: 1 addition & 1 deletion R/summary_functions.R
Expand Up @@ -86,7 +86,7 @@ stationary.migration.summary<-function(Result, prob.cutoff=0.1, min.stay=3) {
Longitudes<-c(Quantiles$Meanlon[period-1], Result$Results$Quantiles$Meanlon[Potential_movement_periods$start[period-1]:Potential_movement_periods$end[period-1]], Quantiles$Meanlon[period])
Latitudes<-c(Quantiles$Meanlat[period-1], Result$Results$Quantiles$Meanlat[Potential_movement_periods$start[period-1]:Potential_movement_periods$end[period-1]], Quantiles$Meanlat[period])
#Distance2<-c(Distance2, sum(sp::spDists(cbind(Longitudes, Latitudes), longlat=TRUE, segments=TRUE)))
Distance2<-c(Distance2, sum(sf::st_distance(sf::st_as_sf(cbind(Longitudes, Latitudes),coords=c('lon','lat'),crs=4326))/1000))
Distance2<-c(Distance2, as.numeric(sum(sf::st_distance(sf::st_as_sf(data.frame(lon=Longitudes, lat=Latitudes),coords=c('lon','lat'),crs=4326))/1000)))

}
Distance2cumulative<-c(0, cumsum(Distance2))
Expand Down

0 comments on commit 4e08bea

Please sign in to comment.