-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
Functions are not currently designed to take arguments in class tibble
. A toy example of this causing failure is shown below.
The simple workaround is to convert tibble
to data.frame
before passing to MIAmaxent. More convenient would be to have MIAmaxent handle tibbles.
library(MIAmaxent)
toydata_tbl <- tibble::as_tibble(toydata_sp1po)
plotFOP(toydata_tbl, 2)
#> Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
#> : span too small. fewer data values than degrees of freedom.
#> Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
#> : at 2
#> Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
#> : radius 1.0002e-24
#> Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
#> : all data on boundary of neighborhood. make span bigger
#> Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
#> : pseudoinverse used at 2
#> Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
#> : neighborhood radius 1.0001e-12
#> Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
#> : reciprocal condition number 1
#> Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
#> : at 2
#> Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
#> : radius 1.0002e-24
#> Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
#> : all data on boundary of neighborhood. make span bigger
#> Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
#> : There are other near singularities as well. 1.0002e-24
#> Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
#> : zero-width neighborhood. make span bigger
plotFOP(as.data.frame(toydata_tbl), 2)
#> Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
#> : span too small. fewer data values than degrees of freedom.
#> Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
#> : pseudoinverse used at 0.067215
#> Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
#> : neighborhood radius 0.29028
#> Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
#> : reciprocal condition number 0
#> Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
#> : There are other near singularities as well. 0.084265
Created on 2025-09-06 with reprex v2.1.1