I'm wrking with animals movements. So, I'm trying to run the demo of moveVis package (in movevis.org get-started .
library(moveVis)
library(move)
data("move_data", package = "moveVis") # move class object
# if your tracks are present as data.frames, see df2move() for conversion
# align move_data to a uniform time scale
m <- align_move(move_data, res = 240, digit = 0, unit = "secs")
# create spatial frames with a OpenStreetMap watercolour map
frames <- frames_spatial(m, path_colours = c("red", "green", "blue"),
map_service = "osm", map_type = "watercolor", alpha = 0.5) %>%
add_labels(x = "Longitude", y = "Latitude") %>% # add some customizations, such as axis labels
add_northarrow() %>%
add_scalebar() %>%
add_timestamps(m, type = "label") %>%
add_progress()
The function frames_spatial start fine with the following messages:
Checking temporal alignment...
Processing movement data...
Approximated animation duration: ≈ 7.52s at 25 fps for 188 frames
Retrieving and compositing basemap imagery...
But than it failed with the error:
Error in match.arg(progress.bar, c("txt", "win", "tk", "none")) :
'arg' should be one of “txt”, “win”, “tk”, “none”
since this is the demo - I assume the code is fine. but I don't know what is missing in my working environmnt that cause this problem
To be able to help you out, it's best you provide us with a reprex.
A reprex consists of the minimal code and data needed to recreate the issue/question you're having. You can find instructions how to build and share one here:
Hey, I ran into the same problem and finally found a solution, hopefully it will solve your issues as well. I traced the error message to a call to pboptions() which appears to come from the package pbapply. It looks like moveVis imports pbapply but just for the heck of it I tried installing pbapply and loading it myself. Low and behold it works now.