Skip to content

Commit

Permalink
version 1.6-2
Browse files Browse the repository at this point in the history
  • Loading branch information
Clement Calenge authored and gaborcsardi committed May 29, 2007
1 parent fb4b12e commit c9f6e77
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 17 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
@@ -1,5 +1,5 @@
Package: adehabitat
Version: 1.6-1
Version: 1.6-2
Date: 2007/05/29
Title: Analysis of habitat selection by animals
Author: Clement Calenge, contributions from Mathieu Basille, Stephane Dray and Scott Fortmann-Roe
Expand All @@ -9,4 +9,4 @@ Suggests: gpclib, sp, spatstat, MASS, tkrplot, shapefiles, CircStats
Description: A collection of tools for the analysis of habitat selection by animals
Encoding: latin1
License: GPL version 2 or newer
Packaged: Tue May 29 17:17:32 2007; calenge
Packaged: Fri Aug 17 11:32:58 2007; calenge
6 changes: 3 additions & 3 deletions R/corrXY.r
Expand Up @@ -15,7 +15,7 @@
### Correction XY vitesse constante
.corrXY <- function(x, y, dab, daa)
{
## Correction éventuelle de x1
## Correction eventuelle de x1
x1 <- x[1]
y1 <- y[1]

Expand All @@ -36,7 +36,7 @@
}
}

## Correction éventuelle de xn
## Correction eventuelle de xn
xn <- x[length(y)]
yn <- y[length(y)]
if (daa[length(daa)]!=dab[length(dab)]) {
Expand Down Expand Up @@ -89,7 +89,7 @@
yc[daa<dab] <- yc[daa<dab] + sin(alpha[daa<dab] + pi)*r[daa<dab]
}

## Cas 2: t1 après
## Cas 2: t1 apres
daa <- daat
dab <- dabt

Expand Down
4 changes: 2 additions & 2 deletions R/cutltraj.r
@@ -1,7 +1,7 @@
##################################################################
##
## cutltraj coupe une trajectoire en plusieurs bursts après une loc
## donnée qui remplit les conditions
## cutltraj coupe une trajectoire en plusieurs bursts apres une loc
## donnee qui remplit les conditions
##


Expand Down
17 changes: 10 additions & 7 deletions R/kernelUD.r
@@ -1,5 +1,6 @@
"kernelUD" <- function(xy, id=NULL, h="href", grid=40, same4all=FALSE,
hlim=c(0.1, 1.5), kern = c("bivnorm", "epa"))
hlim=c(0.1, 1.5), kern = c("bivnorm", "epa"),
extent=0.5)
{
## Verifications
kern <- match.arg(kern)
Expand Down Expand Up @@ -37,8 +38,10 @@
stop("grid should be an object of class asc or a number")
xli<-range(xy[,1])
yli<-range(xy[,2])
xli<-c(xli[1]-0.3*abs(xli[2]-xli[1]),xli[2]+0.3*abs(xli[2]-xli[1]))
yli<-c(yli[1]-0.3*abs(yli[2]-yli[1]),yli[2]+0.3*abs(yli[2]-yli[1]))
xli<-c(xli[1]-extent*abs(xli[2]-xli[1]),
xli[2]+extent*abs(xli[2]-xli[1]))
yli<-c(yli[1]-extent*abs(yli[2]-yli[1]),
yli[2]+extent*abs(yli[2]-yli[1]))
xygg<-data.frame(x=xli, y=yli)
grid<-ascgen(xygg, nrcol=grid)
cellsize<-attr(grid, "cellsize")
Expand Down Expand Up @@ -121,10 +124,10 @@
cellsize<-ref/ncol(grid)

## One adds empty rows and columns to the "core" grid
xll<-xll-lx/2
yll<-yll-ly/2
arajlig<-ceiling((lx/2)/cellsize)
arajcol<-ceiling((ly/2)/cellsize)
xll<-xll-lx*extent
yll<-yll-ly*extent
arajlig<-ceiling((lx*extent)/cellsize)
arajcol<-ceiling((ly*extent)/cellsize)
mrajlig<-matrix(0, ncol=ncol(grid), nrow=arajlig)
grid<-rbind(mrajlig, grid, mrajlig)
mrajcol<-matrix(0, ncol=arajcol, nrow=nrow(grid))
Expand Down
2 changes: 1 addition & 1 deletion R/sett0.r
@@ -1,4 +1,4 @@
## Pour poser le t0 en fonction d'une date de référence
## Pour poser le t0 en fonction d'une date de reference
sett0 <- function(ltraj, date.ref, dt,
correction.xy=c("none", "cs"), tol=dt/10,
units=c("sec", "min", "hour", "day"), ...)
Expand Down
2 changes: 1 addition & 1 deletion R/subsample.r
@@ -1,4 +1,4 @@
### Rééchantillonner une trajectoire
### Reechantillonner une trajectoire
subsample <- function(ltraj, dt, nlo=1,
units=c("sec", "min", "hour", "day"), ...)
{
Expand Down
5 changes: 4 additions & 1 deletion man/kernelUD.Rd
Expand Up @@ -22,7 +22,7 @@
}
\usage{
kernelUD(xy, id = NULL, h = "href", grid = 40, same4all = FALSE,
hlim = c(0.1, 1.5), kern = c("bivnorm", "epa"))
hlim = c(0.1, 1.5), kern = c("bivnorm", "epa"), extent = 0.5)
print.khr(x, \dots)
image.khr(x, axes = FALSE, mar = c(0,0,2,0),
addcontour = TRUE, addpoints = TRUE, \dots)
Expand Down Expand Up @@ -62,6 +62,9 @@ kernelbb(tr, sig1, sig2, grid = 40, same4all = FALSE, byburst = FALSE)
\item{kern}{a character string. If \code{"bivnorm"}, a bivariate
normal kernel is used. If \code{"epa"}, an Epanechnikov kernel is
used.}
\item{extent}{a value indicating the extent of the grid used for the
estimation (the extent of the grid on the abscissa is equal to
\code{(min(xy[,1]) + extent * diff(range(xy[,1])))}).}
\item{x}{an object of class \code{khr} returned by \code{kernelUD}.}
\item{axes}{logical. Whether the axes are to be plotted}
\item{mar}{the margin parameter (see \code{help(par)})}
Expand Down

0 comments on commit c9f6e77

Please sign in to comment.