Hi Santi,
Try this....
xy=data[,c("X","Y")]
id=data[,c("ID")]
I suppose the documentation does not explain exactly how to import the basic
value in R...
If you still have problem with decimal, just ask...I have already solved it!
Cheers
Stef
________________________________
Da: "[email protected]" <[email protected]>
A: [email protected]
Inviato: Domenica 3 Febbraio 2013 11:00
Oggetto: AniMov Digest, Vol 84, Issue 3
Send AniMov mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.faunalia.it/cgi-bin/mailman/listinfo/animov
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of AniMov digest..."
Today's Topics:
1. Re: first passage time: format of coordinates (Sergio Vignali)
2. Re: AniMove plugin for SEXTANTE 1.2.3 (Giovanni Manghi)
----------------------------------------------------------------------
Message: 1
Date: Sat, 2 Feb 2013 17:04:31 +0100
From: Sergio Vignali <[email protected]>
To: Santiago Guallar <[email protected]>, Animal Movement
<[email protected]>
Subject: Re: [AniMov] first passage time: format of coordinates
Message-ID:
<callujbyh5yf-g8brg+zr1xv0bfytnnan9eb+9s9vxxszn7n...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
I don't know the fpt function but I think that the problem is the choose of
the radius.
Look at
http://lists.faunalia.it/pipermail/animov/2010-August/000646.html
Do you know the reference system of your location? Is WGS84?
2013/2/2 Santiago Guallar <[email protected]>
> Thank you very much, Sergio. I'll check the package's documentation.
> xy <- Xloc[,c("lat","long")] selects the two columns where the coordinates
> are (latitude and longitude), so I don't think there's any problem there.
> My coordinates are in the decimal system and I'm checking most of the
> Atlantic Ocean. Distance is in Km.
>
> Have a good weekend!
>
> Santi
>
> *From:* Sergio Vignali <[email protected]>
> *To:* Santiago Guallar <[email protected]>; Animal Movement <
> [email protected]>
> *Sent:* Friday, February 1, 2013 7:35 PM
>
> *Subject:* Re: [AniMov] first passage time: format of coordinates
>
> I think the problem is in the line 4 of your code. You wrote:
> xy <- Xloc[,c("lat","long")]
> but you have to select only the coordinates, not all the object Xloc.
>
> What's the reference system of your coordinates? What's your area of study?
> You have to use metric system if you want metric distance in the ltraj
> object.
> See also AdehabitatLT package and the relative documentation
>
>
> https://www.google.it/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0CD4QFjAB&url=http%3A%2F%2Fcran.r-project.org%2Fweb%2Fpackages%2FadehabitatLT%2Fvignettes%2FadehabitatLT.pdf&ei=wAgMUcClKKiR4ATDxYCIBg&usg=AFQjCNEQPXZ8fO_qNTPyyR7BDnViFGbmWg&sig2=vv3VeQ-lr4Hhkiavq3Uujw&bvm=bv.41867550,d.bGE
>
> When I opened your link I didn't see anything, it's empty, there's not
> your tr1.txt file.
>
> 2013/2/1 Santiago Guallar <[email protected]>
>
> Hi Sergio,
>
> No, I don't use qgis just R.
>
> It's too bad that you can't open the link. Let me show you the head of
> object Xloc, see if you can figure out if the the format of the coordinates
> xy:
>
> fix date hm secs trn1 trn2 lat complat long dist
> 1 noon 07/06/2007 13:15 39240.55 06:18 20:12 20.25 20.25 19.05
> 0.00
> 2 midnight 08/06/2007 00:59 39241.04 05:46 20:12 27.27 24.31 15.03 0.00
> 3 noon 08/06/2007 13:03 39241.54 05:46 20:20 28.81 28.02 16.00 228.65
> 4 midnight 09/06/2007 01:03 39242.04 05:46 20:20 28.76 28.76 15.98 44.41
> 5 noon 09/06/2007 12:59 39242.54 05:46 20:12 27.12 27.92 14.96 73.77
> 6 midnight 10/06/2007 00:59 39243.04 05:46 20:12 27.07 27.07 14.93 51.02
> head veloc conf jul Date ind
> 1 0.00 0.00 9 13671 2007-06-07 13:15:00 2298001
> 2 0.00 0.00 9 13672 2007-06-08 00:59:00 2298001
> 3 13.21 18.95 9 13672 2007-06-08 13:03:00 2298001
> 4 -1.36 3.70 9 13673 2007-06-09 01:03:00 2298001
> 5 46.90 6.18 9 13673 2007-06-09 12:59:00 2298001
> 6 1.79 4.25 9 13674 2007-06-10 00:59:00 2298001
> tr1 seems to be fine:
>
> *********** List of class ltraj ***********
> Type of the traject: Type II (time recorded)
> Irregular traject. Variable time lag between two locs
> Characteristics of the bursts:
> id burst nb.reloc NAs date.begin date.end
> 1 2298001 2298001 587 0 2007-06-07 15:15:00 2008-04-30 03:10:00
> But object F is full of NAs:
> List of 1
> $ :'data.frame': 587 obs. of 30 variables:
> ..$ r1 : num [1:587] NA NA NA NA NA NA NA NA NA NA ...
> ..$ r2 : num [1:587] NA NA NA NA NA NA NA NA NA NA ...
> ..$ r3 : num [1:587] NA NA NA NA NA NA NA NA NA NA ...
> ..$ r4 : num [1:587] NA NA NA NA NA NA NA NA NA NA ...
> ..$ r5 : num [1:587] NA NA NA NA NA NA NA NA NA NA ...
> ..$ r6 : num [1:587] NA NA NA NA NA NA NA NA NA NA ...
> ..$ r7 : num [1:587] NA NA NA NA NA NA NA NA NA NA ...
> .
> .
> .
> .
> Do you think coordinates format is the problem here?
>
> Thank you,
>
> Santi
>
>
> *From:* Sergio Vignali <[email protected]>
> *To:* Santiago Guallar <[email protected]>; Animal Movement <
> [email protected]>
> *Sent:* Thursday, January 31, 2013 7:41 PM
> *Subject:* Re: [AniMov] first passage time: format of coordinates
>
> Hi,
> do you usually use QGIS?
> You can convert your coordinates with qgis of course!
> PS I can't open your link.
>
> Regards
> 2013/1/31 Santiago Guallar <[email protected]>
>
>
> Hello,
>
> I am trying to create a ltraj object to obtain first passage times (with
> the aim to reveal stopover sites of migratory seabirds) using package
> adehabitat, My code is:
>
> require(adehabitat)
> Xloc$Date <- paste( Xloc$date, Xloc$hm)
> Xloc$Date <- as.POSIXct( Xloc$Date, format = "%d/%m/%Y %H:%M", tz = "GMT"
> )
> xy <- Xloc[,c("lat","long")]
> id= Xloc$ind
> tr1 <- as.ltraj( xy, Xloc$Date, id )
> F <- fpt(tr1, seq(300,1000, length=30))
> plot(F, scale = 500, warn = FALSE)
>
> However, I only obtain NAs. I think the problem lies in the format of the
> coordinates. I'm using a decimal format but function fpt() apparently works
> with UTM coordinates. How can I convert them into this format?
> Here is a link to a dput() to file tr1.txt:
> http://file-manager.000webhost.com/file-manager/index.php
>
> Thank you for your help!
>
> Santi
>
>
>
>
> _______________________________________________
> AniMov mailing list
> [email protected]
> http://lists.faunalia.it/cgi-bin/mailman/listinfo/animov
>
>
>
>
> --
> Sergio Vignali
> CERM Centro Rapaci Minacciati
> (Endangered Raptors Centre)
>
>
>
>
>
>
>
> --
> Sergio Vignali
> CERM Centro Rapaci Minacciati
> (Endangered Raptors Centre)
>
>
>
--
Sergio Vignali
CERM Centro Rapaci Minacciati
(Endangered Raptors Centre)
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.faunalia.it/pipermail/animov/attachments/20130202/5518e6e6/attachment-0001.html>
------------------------------
Message: 2
Date: Sun, 3 Feb 2013 10:41:40 +0000
From: Giovanni Manghi <[email protected]>
To: "[email protected]" <[email protected]>
Cc: Animal Movement <[email protected]>
Subject: Re: [AniMov] AniMove plugin for SEXTANTE 1.2.3
Message-ID:
<cacfnynsasbenuqlv-r6h1fd4qw5e4jaw2g59u_jhtg3yusf...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Hi Francesco,
On Thu, Jan 31, 2013 at 11:37 AM, [email protected]
<[email protected]> wrote:
>
> Thanks Giovanni for your comments.
> I will works on it asap.I'll inform you when i'll upload a new version.
on Linux I have understand better what are those pop ups when
computing Kernels: it is the qgis window that ask for the CRS of a
layer. This does not happen when computing MCPs,
Cheers!
-- Giovanni --
------------------------------
Subject: Digest Footer
_______________________________________________
AniMov mailing list
[email protected]
http://lists.faunalia.it/cgi-bin/mailman/listinfo/animov
------------------------------
End of AniMov Digest, Vol 84, Issue 3
*************************************_______________________________________________
AniMov mailing list
[email protected]
http://lists.faunalia.it/cgi-bin/mailman/listinfo/animov