We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Taken from here:
require(data.table) dt <- data.table(subj = c(1,1,2,2,2), code = c("a", "b", "a", "d", "e"))
To use dcast, we need an awkward intermediate step:
dcast
dt[, grp := paste("var", seq_len(.N), sep=""), by=subj]
and then do:
dcast(dt, subj ~ grp, value.var="code")
Instead, it should be possible to do:
dcast(dt, subj ~ rowid(subj, prefix="var"), value.var="code")
Also update this SO post linked in #1205.
The text was updated successfully, but these errors were encountered:
c0dba83
I guess this halfway sort of takes care of #1206 as well, if I'm not mistaken.
And there's probably 30 SO answers that could use this! Let me see if I can dig some up.
Sorry, something went wrong.
arunsrinivasan
No branches or pull requests
Taken from here:
To use
dcast
, we need an awkward intermediate step:and then do:
Instead, it should be possible to do:
Also update this SO post linked in #1205.
The text was updated successfully, but these errors were encountered: