How to use acast (reshape2) within a function in R?

后端 未结 4 1507
感动是毒
感动是毒 2021-02-09 10:40

I tried to use acast from reshape2 within a self written function, but had the problem that acast did not find the data I send to it.

Here is m

4条回答
  •  爱一瞬间的悲伤
    2021-02-09 11:20

    Instead of using the formula specification, use the character specification:

    acast(y, list(names(y)[1], names(y)[2]))
    

提交回复
热议问题