as.telemetry error

334 views
Skip to first unread message

Gianluca Roncalli

unread,
Apr 30, 2020, 10:13:50 AM4/30/20
to ctmm...@googlegroups.com
Hi,
I'm new in using ctmm functions. I'm having an error in transforming my dataframe, which is a subset of my orginal dataframe, in a telemetry object. It' is weird because I was able to transfomr and analyses another subset of my original dataframe, without any problem of "convertion". I can't figure out what 's the problem. It looks like it can't found the ID to divide each indidiviudus/burst and that there's something wrong with time format. 
Here's my script and I attached also my dataframe. 

bc_df$Time<-as.POSIXct(strptime(as.character(bc_df$Time),"%Y-%m-%d %H:%M:%S", tz="CET"))
bc_df<-bc_df[!duplicated(bc_df$Time), ] # duplicated removed (now 1966)
bc_t<-as.telemetry(bc_df, na.rm = "row", drop = FALSE)

and this is the error:

minimum sampling interval of 29 seconds in unknown
Warning messages:
1: In as.telemetry.data.frame(bc_df, na.rm = "row", drop = FALSE) :
  No MoveBank identification found. Assuming data corresponds to one indiviudal.
2: In telemetry.clean(telist[[i]], id = id[i]) :
  Times might be out of order or duplicated in unknown. Make sure that timeformat and timezone are correctly specified.


My tag are setted for recording every 1 hour. 
Thank you in advance for any help.
Regards,

-- 
Gianluca Roncalli

ISPRA (Istituto Superiore per la Protezione e la Ricerca Ambientale)
Area per l'Avifauna Migratrice (BIO-AVM)
Via Cà Fornacetta 9,  
40064 Ozzano dell'Emilia, BO 
Italy
 
Roncalli.Rdata

Anjan Katna

unread,
May 1, 2020, 1:00:41 AM5/1/20
to ctmm R user group
Hi Gianluca,

Will wait for maybe Chris to confirm this -- but it seems that a ctmm object was created assuming that all data belongs to the same animal/id. Your data does not seem to have an Id column- There maybe duplicated timestamps. 
I always have trouble removing duplicates through R due to differences in minutes and seconds -- so I do it in excel.  And I create separate ctmm objects for each individual by separating the data for each individual from the move object dataframe. 

I was able to create a ctmm object using your code

Hope this helps.

Christen Fleming

unread,
May 1, 2020, 11:02:52 PM5/1/20
to ctmm R user group
Hi Gianluca,

It is as Anjan said. The data are not in MoveBank format. If you rename "Logger.ID" to something like "individual.id" then I get

Minimum sampling interval of 58.9 minutes in BACUCCO181614
Minimum sampling interval of 57.6 minutes in BACUCCO181616
Minimum sampling interval of 59.4 minutes in BACUCCO181633
Minimum sampling interval of 58.8 minutes in BACUCCO191667
Minimum sampling interval of 59 minutes in BACUCCO191671
Minimum sampling interval of 59 minutes in BACUCCO191672
Minimum sampling interval of 58.9 minutes in BACUCCO191701

Best,
Chris

Gianluca Roncalli

unread,
May 2, 2020, 5:32:56 AM5/2/20
to Christen Fleming, ctmm R user group
Thank you both.
Done!
Gianluca

--
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/0ea6931c-62cb-46b5-9e87-ff5582ae60c1%40googlegroups.com.

Desiree Guidobaldi

unread,
Apr 28, 2024, 3:11:27 PMApr 28
to ctmm R user group
Hi, 

I am also new to using ctmm. I followed the instructions given above changing ID name and checking the time format. But I always get the following message:

Error in xtfrm.data.frame(x) : cannot xtfrm data frames

Any suggestion?
Looking forward to hearing from you.

Best,
Desirée G. Stenbacka
PhD

Jesse Alston

unread,
Apr 29, 2024, 2:00:36 PMApr 29
to Desiree Guidobaldi, ctmm R user group
Hi Desiree,

Can you include the code you are using?

Jesse



--
Reply all
Reply to author
Forward
0 new messages