Thank you very much Dr. Calenge, I really appreciate your quick and decisive answer. I will be working on it, to adapt to my data, the following days.
deniz On Tue, Aug 18, 2009 at 1:00 PM, <[email protected]> wrote: > 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: Drawing the niche representation (Cl?ment Calenge) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 18 Aug 2009 08:54:48 +0200 > From: Cl?ment Calenge <[email protected]> > Subject: Re: [AniMov] Drawing the niche representation > To: Animal Movement <[email protected]>, [email protected] > Message-ID: <[email protected]> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi Denis, > > > I am new to the list and would like to start with a question. I would > > be glad if someone could help me drawing the niche representation of > > individual animals as one of the results of K-select analysis. The > > graph I am talking about is the one in Calenge et al.'s 2005 > > Ecological Modelling paper, Figure 4 (a). > > Thanks to everyone. > > A combination of the functions s.value (from the package ade4) and > scatterniche can be used (just copy and paste): > > ## prepare the data > data(puechabon) > sahr <- puechabon$sahr > x <- sahrlocs2kselect(sahr) > tab <- x$tab > tab$Aspect <- NULL > > ## perform the K-select analysis > acp <- dudi.pca(tab, scannf = FALSE, nf = 2) > kn <- kselect(acp, x$factor, x$weight, > scannf = FALSE, nf = 2) > > > ## split the coordinates of the pixels by animal > lcoo <- split(as.data.frame(kn$ls), x$factor) > ## split the weight of the pixels by animall > lwei <- split(x$weight, x$factor) > > ## Example for the first animal: > coo1 <- lcoo[[1]] > wei1 <- lwei[[1]] > > ## draw the graph of the coordinates for the first animal: > scatterniche(coo1, wei1, percent=100) > s.label(coo1, clab=0, add.p=TRUE) > s.value(coo1, wei1, add.p=TRUE) > > ## and for all the animals: > par(mfrow=n2mfrow(length(lcoo))) > lapply(1:length(lcoo), function(i) { > coo1 <- lcoo[[i]] > wei1 <- lwei[[i]] > scatterniche(coo1, wei1, percent=100) > s.label(coo1, clab=0, add.p=TRUE) > s.value(coo1, wei1, add.p=TRUE) > }) > > > You might also want to consider the functions kplot.kselect and s.distri > from the package ade4 perform similar graphs, see the examples of the > help page of kplot.kselect. > Hope this helps, > > Cl?ment Calenge > -- > > Cl?ment CALENGE > Office national de la chasse et de la faune sauvage > Saint Benoist - 78610 Auffargis > tel. (33) 01.30.46.54.14 > > > > ------------------------------ > > _______________________________________________ > AniMov mailing list > [email protected] > http://lists.faunalia.it/cgi-bin/mailman/listinfo/animov > > > End of AniMov Digest, Vol 47, Issue 6 > ************************************* >
_______________________________________________ AniMov mailing list [email protected] http://lists.faunalia.it/cgi-bin/mailman/listinfo/animov
