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

Cannot set attributes on NULL #2

Open
justinkamerman opened this issue Oct 24, 2017 · 0 comments
Open

Cannot set attributes on NULL #2

justinkamerman opened this issue Oct 24, 2017 · 0 comments
Assignees

Comments

@justinkamerman
Copy link
Collaborator

Hi Justin,

I am trying to help my other student debug some of her code and at one point she calls p.QFASA so that she can use the result as a starting vector in her optimization algorithm. When I called the p.QFASA function, however, I got this warning:

Warning message:
In structure(c(), class = c(class(x), class(y))) :
  Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes.
  Consider 'structure(list(), *)' instead.

Because she just needs starting values which appear to be correct, she was not overly concerned and has been ignoring the warnings. At first, I assumed she was doing something different but finally was able to pinpoint where the warning was coming from and I think it’s a result of a new change in R. The warning comes from AIT.obj and specifically in the line:

sealhat <- t(as.matrix(alpha)) %*% prey.quantiles

(I’m guessing the warning would also happen using the other distance measures.)

According to R news:

structure(NULL, ..) is now deprecated as you cannot set attributes on NULL.

So my worry is that users of QFASA will now get this warning message. (When I tried to run the line above on some old data, I also got this message.)

Anyways, I don’t want you to spend a lot of time on this but if you think this is an issue with an easy fix – feel free to look into it!

Thanks!!

Connie

@justinkamerman justinkamerman self-assigned this Oct 24, 2017
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

1 participant