阅读背景:

如何使用R中的plyr包创建与给定列的级别对应的新数据框列?

来源:互联网 

I am looking for an "elegant" way to basically split a data frame by the levels of one column variable, then create a new output data frame reshaped to now drop the factor variable and add new columns for the levels of the factor variable. I can do this with functions such as the split() method, but this seems to be the messy way to me. I have been trying to do this using the melt() and cast() functions in the plyr package, but haven't been successful in getting the exact output I need.I am looking for an "elegant" way to basically




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: