RossDwyer / VTrack

V-Track: software for analysing and visualising animal movement from acoustic telemetry detections
https://cran.r-project.org/web/packages/VTrack/index.html
13 stars 5 forks source link

Install VTrack error #27

Open SimoneCitta opened 10 months ago

SimoneCitta commented 10 months ago

Hello, I am trying to install the VTrack package on a new device using these commands:

install.packages("devtools") devtools::install_github("rossdwyer/VTrack")

But every time I try I get this error:

I think the problem is related to the storage of the "plotKML" package. Do you know how I can solve this error or if new versions of the VTrack package have been released. Thank you.

Installing package into ‘H:/R/RLibs/R420’ (as ‘lib’ is unspecified) '\bournemouth.ac.uk\data\staff\home\scittadino' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory. ERROR: dependencies 'plotKML', 'maptools' are not available for package 'VTrack'

Versions of these packages for your version of R might be available elsewhere, see the ideas at https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages 2: In i.p(...) : installation of package ‘C:/Users/SCITTA~1/AppData/Local/Temp/RtmpWS36M0/file1c846d7e48d5/VTrack_2.11.tar.gz’ had non-zero exit status

I think the problem is related to the archiving of the "plotKML" package. Do you know how I can solve this error or if new versions of the VTrack package have been released. Thank you.

feosborne commented 9 months ago

I am having the same issue

vinayudyawer commented 9 months ago

Unfortunately, we haven't had a chance to update the VTrack package since the retiring of the 'plotKML' and 'maptools' packages which are currently dependencies, and the significant amount of changes due to the retiring of the 'sp' package.

Updates to VTrack are going to require a significant re-writing of the code and underlying dependencies, which Ross or myself have not had time to do. We will work to get these updated in the new year, but till then one work-around would be to install an older version of R to run the VTrack package.

MattMarine commented 8 months ago

Hi, I've been trying to install VTrack on an older version of R using the CRAN archive, but when I try to install the VTrack package I get the error:

Warning: unable to access index for repository https://cran-archive.r-project.org/src/contrib: cannot open URL 'https://cran-archive.r-project.org/src/contrib/PACKAGES'

Do you know why this might be? Also what is the most recent version of R required to run the VTrack package? Thanks :)

RossDwyer commented 6 months ago

I've now amended VTrack so that it no longer relies on the kml function from the (now defunct) plotKML r package

SimoneCitta commented 6 months ago

Thank you for your effort but I still have the same problem with package dependency, can you suggest a way to avoid it?

briannacahill commented 6 months ago

Hello, I am also still seeing the dependency errors. Do you have a suggested workaround?

"ERROR: dependencies ‘plotKML’, ‘maptools’ are not available for package ‘VTrack’"

Thank you in advance for your time!

RossDwyer commented 6 months ago

I've removed additional references to plotKML and associated functions (kml,STIDF) in VTrack v2.2. This should only affect the function GenerateAnimationKMLFile_Multitag().

Fixing the maptools dependency will likely be a different issue that needs some thought

jessicas09 commented 5 months ago

Ah came here because I was having the same issue! Having trouble installing VTrack because of the maptools dependency.

ERROR: dependency ‘maptools’ is not available for package ‘VTrack’

feosborne commented 5 months ago

Hi, Ross has updated the VTrack package and it now installs and runs correctly. You may have to make sure that you are running the most recent R package and version of R studio.

From: jessicas09 @.> Date: Saturday, 9 March 2024 at 10:26 am To: RossDwyer/VTrack @.> Cc: Felicity Osborne @.>, Comment @.> Subject: Re: [RossDwyer/VTrack] Install VTrack error (Issue #27)

Ah came here because I was having the same issue! Having trouble installing VTrack because of the maptools dependency.

ERROR: dependency ‘maptools’ is not available for package ‘VTrack’

— Reply to this email directly, view it on GitHubhttps://github.com/RossDwyer/VTrack/issues/27#issuecomment-1986597085, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AWWISKXIPSFJQ2DM72ANAFLYXJJLTAVCNFSM6AAAAAA6G4IE5OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBWGU4TOMBYGU. You are receiving this because you commented.Message ID: @.***>

feosborne commented 1 week ago

Hey Pablo, Hope the wonderful world of scuba is treating you well.

I was wondering if you may be able to help me out with a VTrack issue or see if you have come across the same problem before.

My TID.Movment file does not have distance for all of my transmitters. It only seems to have distance calculated for 22 of the 43 transmitter ids but Residence has all 43 ids. For example, transmitter ID 41314 moved from FAD2 to FAD3 but there is no movement record in the TID Movement file (non-residence) for it, but it is in the residence file. I am not sure why this may be and was hoping you might be able to explain it.

Cheers, Flick

feosborne commented 1 week ago

Hey Flick,

I have no idea how you are getting VTrack to even calculate any rows for distance, I haven’t been able to haha.

I manually do it using a little dplyr function and the harversine function from geosphere (which calculates distance while accounting for the earth not being flat).

calculate_distance <- function(df) { df <- df %>% group_by(Tag_ID, Arrival_location, Arrival_date, Departure_date) %>% mutate( distance = distHaversine( # Use distHaversine function to calculate distance between two points matrix(c(receiver_deployment_longitude[1], receiver_deployment_latitude[1]), nrow = 1), matrix(c(receiver_deployment_longitude[2], receiver_deployment_latitude[2]), nrow = 1) ) / 1000 # Convert meters to kilometers ) %>% mutate( distance = round(distance, 0) # Round to 0 decimal places ) return(df) }

run the function

fdat3 <- calculate_distance(fdat2)

for the grouping I just renamed columns from STARTTIOME ENDTIME to start and end date and the same with STATIONNAME1 STATIONNAME2 to arrival / departure location.

Maybe throw the function at chatgpt, as well as a head / summary / str – of your data frame and ask it to reconfigure the function to tailor it towards the name of your columns so it runs. That’s normally how I edit other peoples functions.

Hope this helps,

Pablo

From: Felicity Osborne @.> Date: Wednesday, 14 August 2024 at 5:41 pm To: Pablo Fuenzalida Miralles @.> Cc: RossDwyer/VTrack @.***> Subject: VTrack movements Hey Pablo, Hope the wonderful world of scuba is treating you well.

I was wondering if you may be able to help me out with a VTrack issue or see if you have come across the same problem before.

My TID.Movment file does not have distance for all of my transmitters. It only seems to have distance calculated for 22 of the 43 transmitter ids but Residence has all 43 ids. For example, transmitter ID 41314 moved from FAD2 to FAD3 but there is no movement record in the TID Movement file (non-residence) for it, but it is in the residence file. I am not sure why this may be and was hoping you might be able to explain it.

Cheers, Flick