as.telemetry error (New user)

29 views
Skip to first unread message

Malakhi Spint

unread,
May 6, 2024, 6:38:30 PMMay 6
to ctmm R user group
Hey all,

I'm practically completely new to R and the ctmm package. I'm trying to use it to find outliers in my data. When I use package, when I try to use as.telemetry it gives me an error "Error in `$<-.data.frame`(`*tmp*`, "id", value = c(1L, 1L, 1L, 1L, 1L, :
replacement has 5505 rows, data has 0"

I don't know why it says there is no data. I would love to get some expert opinions.

Thanks!

Jesse Alston

unread,
May 7, 2024, 11:05:33 AMMay 7
to ctmm R user group
Hi Malakhi,

If you do str(name_of_data.frame), what does the result look like? This is related to the structure of your data.

Jesse

Malakhi Spint

unread,
May 11, 2024, 6:30:58 PMMay 11
to ctmm R user group
Hey Jesse,

This is the sample that the str() brings. I've been trying to format it correctly ever since and have still had the issue.

'data.frame': 5046 obs. of 16 variables: $ animal.id : int 40879 40879 40879 40879 40879 40879 40879 40879 40879 40879 ... $ timestamp.utc : chr "2023-11-28 7:00 PM" "2023-11-28 6:00 PM" "2023-11-28 5:00 PM" "2023-11-26 9:16 PM" ... $ timestamp.lmt : chr "2023-11-28 12:00:11-07:00" "2023-11-28 11:00:40-07:00" "2023-11-28 10:00:11-07:00" "2023-11-26 14:16:32-07:00" ... $ timestamp.scts.utc : chr "2023-11-28 8:03 PM" "2023-11-28 8:03 PM" "2023-11-28 8:03 PM" "2023-11-26 9:17 PM" ... $ timestamp.scts.lmt : chr "2023-11-28 13:03:04-07:00" "2023-11-28 13:03:04-07:00" "2023-11-28 13:03:04-07:00" "2023-11-26 14:17:04-07:00" ... $ manufacturer.name : chr "Iridium" "Iridium" "Iridium" "Iridium" ... $ reciever.latitude : num 46.8 46.8 46.8 46.8 46.8 ... $ receiver.longitude : num -114 -114 -114 -114 -114 ... $ height.above.mean.sea.level: int 1492 1487 1484 1490 1485 1492 1472 1474 1481 1476 ... $ GPS.DOP : num 2.4 2.6 5.6 4.4 4 2.4 3 2.2 2.6 4.4 ... $ GPS.fix.type : chr "3" "3" "3" "3" ... $ mortality.status : chr "Nothing Detected" "Nothing Detected" "Nothing Detected" "Nothing Detected" ... $ external_temp : int 7 5 5 10 11 15 10 9 7 4 ... $ voltage.resolution : num 3.28 3.28 3.36 3.28 3.28 3.28 3.36 3.28 3.28 3.36 ... $ beacon.frequency : num 3.6 3.6 3.6 3.6 3.6 3.6 3.6 3.6 3.6 3.6 ... $ animal.nickname : chr "Animal with Collar 40879" "Animal with Collar 40879" "Animal with Collar 40879" "Animal with Collar 40879" ...

Best,
Malakhi

Jesse Alston

unread,
May 11, 2024, 6:57:25 PMMay 11
to Malakhi Spint, ctmm R user group
Hi Malakhi,

You need to rename your relevant timestamp, latitude, and longitude columns (timestamp.utc, receiver.latitude, and receiver.longitude?) according to Movebank conventions, or at least simpler names. Chris has done a lot of work to allow ctmm to automatically detect and reformat relevant data, but he can’t code in every possible option.

Jesse

Sent via mobile--I apologize for excess brevity

On May 11, 2024, at 5:31 PM, Malakhi Spint <malakh...@gmail.com> wrote:

Hey Jesse,
--
You received this message because you are subscribed to the Google Groups "ctmm R user group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ctmm-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ctmm-user/c279162a-883d-4d8d-ba58-7fb201f0ad76n%40googlegroups.com.

Malakhi Spint

unread,
May 11, 2024, 7:04:58 PMMay 11
to ctmm R user group
Thank you for your responses! They are named according to the Movebank Attribute page, but I have changed them and still no dice. I've also tried the ctmm.shiny as well and get an error hoping it may tell me more.

Thank you for your help!
Malakhi

Christen Fleming

unread,
May 16, 2024, 11:09:36 PMMay 16
to ctmm R user group
Hi Malakhi,

Can you paste what head() returns on the data.frame?

Best,
Chris

Malakhi Spint

unread,
Jun 6, 2024, 12:39:33 PMJun 6
to ctmm...@googlegroups.com
Hey Chris,

Sorry for the late response. I just had to reformat multiple times and I ended up getting it to work!

Best-
Malakhi
Reply all
Reply to author
Forward
0 new messages