View source: R/helper_functions.R
get_radius_gyration | R Documentation |
Calculate Radius of Gyration
get_radius_gyration( DF, Latitude_Name = "Trip_End_Latitude", Longitude_Name = "Trip_End_Longitude" )
DF |
The dataframe that contains all trips that you want to calculate the radius of gyration for |
Latitude_Name |
Character string of the column name in DF that has the trip end latitude location |
Longitude_Name |
Character string of the column name in DF that has the trip end longitude location |
Rg a single numeric value that gives the radius of gyration for the supplied dataframe in kilometers
Julie Wisch
https://blog.jlevente.com/radius-of-gyration/ https://alzres.biomedcentral.com/articles/10.1186/s13195-021-00852-1
## Not run: DF <- data.frame( "MapID" = c(68771, 68771, 69876), "Trip_End_Latitude" = c(38.88768, 38.606689, 40.23523), "Trip_End_Longitude" = c(99.6986, 97.76478, 98.56789) ) get_radius_gyration( DF[DF$MapID == 68771, ], "Trip_End_Latitude", "Trip_End_Longitude" ) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.