reshape2 的文档提供了有关 dcast 的子集属性的以下详细信息:
subset quoted expression used to subset data prior to reshaping, e.g. subset = .(variable=="length").
但是,尝试使用此语法会导致以下错误:
Error in cast(data, formula, fun.aggregate, ..., subset = subset, fill = fill, :
could not find function "."
如何构造一个“引用表达式”以在 dcast 子集中使用?