Rafnuss / GeoPressureR

Global positioning by atmospheric pressure
https://raphaelnussbaumer.com/GeoPressureR
GNU General Public License v3.0
7 stars 1 forks source link

Can't use `pam_classify()` and `trainset_write()` without acceleration data #25

Closed Rafnuss closed 2 years ago

Rafnuss commented 2 years ago

If no acceleration data is available for your track, some functions won't work. With the error message:

Error in pam_classify(pam_data) :
  "date" %in% names(pam$acceleration) is not TRUE

This is the case for

Rafnuss commented 2 years ago

One way of solving this is to create fake acceleration data and bypass pam_classify() with,

pam_data$acceleration = pam_data$pressure
pam_data$acceleration$obs = 0
pam_data$acceleration$ismig = FALSE