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
{{ message }}
Repository navigation
spread with missing values of a factor of key_value #25
I want to make tables from different data where I use spread to make tables with levels of a factor for columns. spread is a good tool to do this. I need all columns even if there are no observations of some levels of the factor. reshape::cast with add.missing accomplished this; spread has no option with the same ability. Here is a simple example:
This is the facility from cast I would like retained or returned. May be I am missing something in the spread options or some other function I should be using in tid- or dpl-yr.
Activity
desmondpatel commentedon Sep 7, 2014
Is tidyr available for R version 3.03?
MCOtto commentedon Sep 7, 2014
This does not address this issue for spread, but you look in the description file for the package.
Depends: R (>= 3.1.0)
means that it requires a version later than 3.03. I would update R.
Mark
hadley commentedon Oct 7, 2014
MRE:
hadley commentedon Oct 7, 2014
I've called the argument
drop, since that what it is in reshape2 (and it's consistent with other uses)