Skip to content

niche.param(x) requires x$call[[2]] to still be in the environment #14

@wlandau

Description

@wlandau

From @Rekyt via ropensci/drake#590:

library(ade4)
data(doubs)
dudi1 <- dudi.pca(doubs$env, scale = TRUE, scan = FALSE, nf = 3)
nic1 <- niche(dudi1, doubs$fish, scann = FALSE)
omi <- niche.param(nic1)
rm(dudi1)
omi <- niche.param(nic1)
#> Error in eval(expr, p): object 'dudi1' not found

If nic1 really needs dudi1 in order to use niche.param(), is there some way to make sure the value of dudi1 gets passed along with nic1? Maybe in a new list element of nic1 or another argument to niche.param()?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions