You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I have noticed an inconsistency in the behavior of melt when measure.vars is a list (so multiple value columns appear in the result).
Here is a minimal reproducible example:
> (na.rm.T <- melt(wide.dt, measure.vars=measure.vars, na.rm=TRUE))
family variable age sex
1: 1 1 5 m
> (na.rm.F <- melt(wide.dt, measure.vars=measure.vars, na.rm=FALSE)[!is.na(age)])
family variable age sex
1: 1 2 5 m
I expected variable=2 in both cases, but variable=1 with na.rm=TRUE, which I believe is incorrect/buggy.
At the very least this behavior is confusing. I expected that variable in the output should corresponding to the index of the corresponding column in the measure.vars list (2).
There are a few other issues open about melt into multiple columns but after reviewing them they all seem to be different.
The text was updated successfully, but these errors were encountered:
hi again, any plan to fix this issue? seems like it should be easy, I could try to fix it myself, but it would be nice if somebody tells me where to look...
Hi I have noticed an inconsistency in the behavior of melt when measure.vars is a list (so multiple value columns appear in the result).
Here is a minimal reproducible example:
On my system I get:
I expected variable=2 in both cases, but variable=1 with na.rm=TRUE, which I believe is incorrect/buggy.
At the very least this behavior is confusing. I expected that
variable
in the output should corresponding to the index of the corresponding column in the measure.vars list (2).There are a few other issues open about melt into multiple columns but after reviewing them they all seem to be different.
The text was updated successfully, but these errors were encountered: