-
Notifications
You must be signed in to change notification settings - Fork 985
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
as.data.table(dfidx) fails #4526
Comments
I would lean towards closing... I don't think it's In the meantime I would probably just do:
|
@MichaelChirico shouldn't |
No, because |
OK, make sense |
Hmm, actually looking, maybe it's a The issue is that in Then we try to extract columns again:
BUT this is calling i.e. we have two loops in (1) checking structure of final object: Lines 132 to 151 in 3436568
(2) building the object: Lines 171 to 191 in 3436568
In the first one, we can rely on |
#4529 would make it so that |
AFAIK, @MichaelChirico please correct me if I am wrong, it should be enough if maintainer of |
that sounds right to me |
The class
dfidx
(from the packagedfidx
) exists. Here the idea is to glue and idxdata.frame
to anotherdata.frame
, and when working with the desireddata.frame
, the idx object always is glued to it. This is for example used in themlogit()
package. Conversion of this type todata.table
fails.Gives the following error message:
The
mlogit
package requires such an object to carry out the desired regression. dfidx objects also come with their own '['.More on this here:
https://cran.microsoft.com/web/packages/dfidx/vignettes/dfidx.html#more_advanced_use_of_dfidx
One could always use
dcast()
andmelt()
to changedata.table
s from wide to long etc. and just use dfidx right before the estimation. Another alternative would be to write a function like the following (which of course is terribly inefficient)Another approach would be to use setDT, which also delivers a warning:
And the following call of that object will deliver an error:
Hopefully you can just give
as.data.table()
andsetDT()
the power to overwrite this and drop the idxdata.frame
(potentially with a warning that some commands which require it in the future may fail).The text was updated successfully, but these errors were encountered: