Description Usage Arguments Value Examples
View source: R/data_cleaning.R
Cleans a raw animal GPS dataset, implementing a standardized procedure to remove impossible values
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 
| df | data frame in standardized format (e.g., from a raw spreadsheet) | 
| dtype | data type, iGotU or Columbus P-1 | 
| prep | reformat columns if all required columns are not present, defaults to True | 
| filters | filter bad data points, defaults to true | 
| aniid | identification code for the animal | 
| gpsid | identification code for the GPS device | 
| maxrate | maximum rate of travel (meters/minute) between consecutive points | 
| maxcourse | maximum distance (meters) between consecutive points | 
| maxdist | maximum geographic distance (meters) between consecutive points | 
| maxtime | maximum time (minutes) between consecutive points | 
| tz_in | input time zone, defaults to UTC | 
| tz_out | output time zone, defaults to UTC | 
data frame of clean animal GPS data
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # Clean a data frame from csv
## Read igotU data
bannock_df <- read.csv(system.file("extdata", "demo_nov19/Bannock_2017_101_1149.csv", 
package = "animaltracker"), skipNul=TRUE)
## Clean and filter
clean_location_data(bannock_df, dtype = "igotu", filters = TRUE, aniid = 1149, 
gpsid = 101, maxrate = 84, maxdist = 840, maxtime = 100)
## Clean without filtering
clean_location_data(bannock_df, dtype = "igotu", filters = FALSE, aniid = 1149, 
gpsid = 101, maxrate = 84, maxdist = 840, maxtime = 100)
# Clean a data frame from txt
## Read Columbus P-1 data
columbus_df <- read_columbus(system.file("extdata", "demo_columbus.TXT", 
package = "animaltracker"))
## Clean and filter
clean_location_data(columbus_df, dtype = "columbus", filters = TRUE, aniid = 1149, 
gpsid = 101, maxrate = 84, maxdist = 840, maxtime = 100)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.