Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wlandau opened this issue Nov 30, 2018 · 1 comment
Open

Comments

@wlandau
Copy link

wlandau commented Nov 30, 2018

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()?

@sdray
Copy link
Collaborator

sdray commented Dec 7, 2018

In ade4, many methods use this way to deal with previous analyses without storing objects. I know this is probably not the best way but it would require too much work to modify in all functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants