#' Radiotrack an animal
#'
#' @description Does the station processing chain for every station of an animal
#'
#'
#' @param animal list, a list from initAnimal
#'
#'
#'
animal_process = function(animal){
s = list.files(animal$path$raw, full.names = TRUE)
# for every station in raw
for(i in s){
# subset with awk
station_subset(animal,
station_file = i)
if(file.info(paste0(animal$path$stations, "/", basename(i)))$size > 1){
# read subset
st = station_read(paste0(animal$path$stations, "/", basename(i)))
# save keepalives
st_kplv = station_keepalive(st)
write.csv(st_kplv, paste0(animal$path$keepalive,"/", st_kplv$station[1],"_keep_alives.csv"), row.names = FALSE)
# cleanup frequency and noise, overwrite awk subset
st = station_cleanup(st, freq = animal$meta$freq)
write.csv(st, paste0(animal$path$stations, "/", basename(i)), row.names = FALSE)
}else{
file.remove(paste0(animal$path$stations, "/", basename(i)))
}
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.