-
Notifications
You must be signed in to change notification settings - Fork 2
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
Replace Node$fields and Node$fieldsAll with Node$attributes* #3
Comments
Hey @brownag and @dylanbeaudette! Did you perhaps find a solution for this? I'll also reach out to the |
A general fix, but keeping the data.tree in .rda files, would be to set The datasets could alternately, as I proposed above, be be simple (e.g. data.frame) representation of the information to build the data.tree. On load a data.tree object would be constructed from the source data and kept in the package environment, a custom environment, or similar. Access to these internal objects would be by functions that check if the object has been loaded, if not load and build it. We have not done much development on this package internals recently, and none of our code calls The messages (and Node $fields / $fieldsAll) need to be removed from data.tree, actually deprecating them as the message says will cause all sorts of warnings to be issued in the same way that we currently get It does not appear to me that any code internal to the data.tree package calls them, but rather this is the result of some internal iteration over those objects for lazy loading, and also possibly things like the IDE interrogating objects in the environment? |
That seems great, thanks! 🙏 |
Sorry for the late reply. Will be fixed in the next release, due for Nov 2023. |
Thanks @gluc!! Just as a heads up, with data.tree 1.1.0, and lazy loading data.tree objects built with 1.1.0, we now get the following:
In R CMD CHECK we get this, which is a bit "worse" than the
Again, we never explicitly reference $fields or $fieldsAll, but during lazy loading apparently these are called repeatedly. This is not a huge problem for this package specifically because it is not on CRAN. I was planning on removing lazy loading, and possibly not storing the data.tree objects at all anymore, so will likely implement that for the time being until these are completely removed. |
I believe this is issued on install when the the .rdata files for the data.tree objects are moved to lazyload db.
I figured it would be resolved by re-building/re-saving the objects with a current version of {data.tree}... but no such luck. They build fine, no messages. Perhaps it will resolve itself? We do not use either of these R6 methods directly in the scripts to build the trees for
tree_calc
.We could take an alternate approach where we store a .rda of a data.frame which is "promoted" to a suitable Node/data.tree via a pathString. That is "simpler" than storing a serialized R6 object for a few reasons...
We can make the data.tree as is currently done in e.g. https://github.com/ncss-tech/interpretation-engine/blob/master/misc/internal-datasets/HSG/tr.hsg.R via a function "on the fly" (possibly based on user input/parameters) or on package load or similar.
The text was updated successfully, but these errors were encountered: