相关疑难解决方法(0)

ddply错误的含义:'names'属性[9]的长度必须与vector [1]的长度相同

我正在通过黑客机器学习,我被困在这一行:

from.weight <- ddply(priority.train, .(From.EMail), summarise, Freq = length(Subject))
Run Code Online (Sandbox Code Playgroud)

这会产生以下错误:

Error in attributes(out) <- attributes(col) : 
  'names' attribute [9] must be the same length as the vector [1]
Run Code Online (Sandbox Code Playgroud)

这是一个追溯():

> traceback()
11: FUN(1:5[[1L]], ...)
10: lapply(seq_len(n), extract_col_rows, df = x, i = i)
9: extract_rows(x$data, x$index[[i]])
8: `[[.indexed_df`(pieces, i)
7: pieces[[i]]
6: function (i) 
   {
       piece <- pieces[[i]]
       if (.inform) {
           res <- try(.fun(piece, ...))
           if (inherits(res, "try-error")) {
               piece <- paste(capture.output(print(piece)), collapse = "\n")
               stop("with piece ", i, ": …
Run Code Online (Sandbox Code Playgroud)

r plyr

37
推荐指数
2
解决办法
3万
查看次数

标签 统计

plyr ×1

r ×1