[R] did bot execute

Neotropical bat risk assessments neotrop|c@|@b@t@ @end|ng |rom gm@||@com
Wed Jun 3 03:14:27 CEST 2020


Hi Abby,

Tried this new version but did not execute...
Clearly I am missing a step.

Bruce
 > library (barsurf)
 > library (KernSmooth)
 > set.bs.theme ("heat")
 >
 > plot_ds <- function (dataset, main="", xlim, ylim, ...,
+ ncontours=3, labcex=0.8, ndec=3,
+ k1=1, k2=1, n=30)
+ {   names <- names (dataset)
+ x <- dataset [,1]
+ y <- dataset [,2]
+ bw.x <- k1 * bw.nrd (x)
+ bw.y <- k2 * bw.nrd (y)
+ if (missing (xlim) )
+ xlim <- range (x) + c(-1, 1) * bw.x
+ if (missing (ylim) )
+ ylim <- range (y) + c(-1, 1) * bw.y
+
+ ks <- bkde2D (dataset, c (bw.x, bw.y),
+ c (n, n), list (xlim, ylim), FALSE)
+
+ fb <- seq (min (ks$fhat), max (ks$fhat),
+ length.out = ncontours + 2)
+ fb <- fb [2:(ncontours + 1)]
+ fb <- round (fb, ndec)
+
+ plot_cfield (ks$x1, ks$x2, ks$fhat,
+ contours=FALSE,
+ main=main, xlab = names [1], ylab = names [2],
+ xyrel="m")
+ points (x, y, pch=16, col="#00000040")
+ contour (ks$x1, ks$x2, ks$fhat, levels=fb, labcex=labcex, add=TRUE)
+ }
 >
 > plot_ds (bat_call, "plot 2", c (25, 28), c (-15, 10), k1=1.25, k2=1.25)
*Error in plot_ds(bat_call, "plot 2", c(25, 28), c(-15, 10), k1 = 1.25,  
: **
**  object 'bat_call' not found*

	[[alternative HTML version deleted]]



More information about the R-help mailing list