moveVis icon indicating copy to clipboard operation
moveVis copied to clipboard

frames_spatial() cropping issue?

Open WhitneyH1317 opened this issue 2 years ago • 1 comments

When I run frames_spatial I get the following error:

Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 'crop': unable to find an inherited method for function ‘xmax’ for signature ‘"data.frame"’

I've read in a csv and run the following code: move_data2 <- df2move(data2[1:30, ], proj = proj_string, x = "longitude", y = "latitude", time = "Time.Stamps")

align move_data to a uniform time scale, fix for inconsistent data

m <- align_move(move_data2, res = 60, unit = 'mins') ext <- extent(m) ext@xmin <- ext@xmin - (ext@xmin0.003) ext@xmax <- ext@xmax + (ext@xmax0.003)

create spatial frames for a certain map service

get_maptypes() frames <- frames_spatial(m, path_colours = c("red"), map_service = "carto", map_type = "dark", alpha = 0.5, ext = ext) %>% add_labels(x = "Longitude", y = "Latitude") %>% # add some customizations, such as axis labels add_northarrow() %>% add_scalebar() %>% add_timestamps(type = "label") %>% add_progress()

I've tried making sure other spatial libraries aren't also loaded, in case there's a "crop" issue between packages, but that didn't help. I've tried looking in the source code and am having trouble seeing where the extent() command is or how to solve this. Any advice?

WhitneyH1317 avatar Jul 07 '23 04:07 WhitneyH1317

Hi, reinstalling the package from github with devtools rather than install.packages() solved this issue. devtools::install_github("16EAGLE/moveVis")

JoChambon avatar Nov 22 '23 23:11 JoChambon