-
Notifications
You must be signed in to change notification settings - Fork 360
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
problem in unstack #691
Comments
I've always found stack and unstack inscrutable. I would be so happy to replace them with the semantics of Hadley Wickham's tidyr. |
The benefit of just copying all of Hadley's good designs is hard to overstate. |
Hadley's tidyr is nice and something to shoot for. It does rely on R's delayed evaluation for some things, so we'd need to use expressions or some other way to get some of the fancier features. For example, Hadley's res <- gather(messy, drug, heartrate, a:b) might need to look like:
We've already gotten into trouble trying to use expressions for things like this, so it would take some thinking. Anyway, back to @floswald's problem.
We could/should try to make better column names to handle this case. |
I've said it before and I'll say it again: having a |
thanks @tshort i wouldn't have guessed that. didn't know not sure why you guys have strong opinion on the column name thing. |
I guess using symbols is ok, but it just feels off to me. The most concrete issue I can think of is that it makes expressing actual symbols hard in these contexts. Not the end of the world, but not great either. |
I actually kind of love the use of symbols, since it's almost a perfect reversal of embedded SQL: http://infolab.stanford.edu/~ullman/fcdb/oracle/or-proc.html |
sorry can I just add a question here? I'm still wondering how to best unstack my data.frame. i should convert the column that becomes the new column names into strings, right? how do i do this here?
also, for a temporary fix that addresses that one could do something very similar to |
To convert a vector to a string, you can do: map(string, df[:x1]) |
hope I'm using this correctly. from looking at the function signature that was my best guess:
The text was updated successfully, but these errors were encountered: