0

我跑了

renv::status()

回来了:

Error in seq_len(length(splat) - 1) : 
  argument must be coercible to non-negative integer

我试过traceback()并回来了:

f(n[[i]], x[[i]], ...)
7: FUN(X[[i]], ...)
6: lapply(idx, callback)
5: enumerate(fields, function(section, entries) {
       splat <- strsplit(section, "/", fixed = TRUE)[[1]]
       for (i in seq_len(length(splat) - 1)) {
           k <- splat[1:i]
           if (is.null(data[[k]])) 
               data[[k]] <<- list()
       }
       data[[splat]] <<- entries
   })
4: renv_lockfile_read(lockpath)
3: renv_status_check_missing_lockfile(project, lockpath)
2: renv_status_impl(project, libpaths, lockpath, cache)
1: renv::status()

我从哪里开始故障排除?

PS 我在 Windows 10 和 R 4.0.4

更新 这里是 renv.lock 文件

更新锁

4

1 回答 1

1

您的锁定文件嵌入了合并冲突标记:

<<<<<<< HEAD
      "Hash": "97def703420c8ab10d8f0e6c72101e02"
=======
      "Hash": "97def703420c8ab10d8f0e6c72101e02",
      "Requirements": [
        "magrittr",
        "rlang"
      ]
>>>>>>> 3f3484f01258197d106dc7e7bcdec33784407f38
    },

您需要手动编辑并从您的锁定文件中删除它们。

于 2022-02-18T22:33:39.970 回答