小编Xia*_*eng的帖子

如何解决“错误:名称必须是唯一的”。在 r 包 ggstatsplot 中?

问题:

\n\n

我尝试运行一个函数(ggwithinplot)来绘制 r 包 ggstatsplot 中的数据。但运行这个函数花了很长时间,什么结果也没有。

\n\n

在此输入图像描述

\n\n

所以我在这个功能运行时关闭了它。我试着等待。它不起作用。所以这个问题不是时间问题。

\n\n

之后我想知道是否是因为我得到了大量的数据点(N=2000)。因此我尝试了另一个包含 250 个数据点的样本。这次,我收到此错误:“错误:名称必须是唯一的。”

\n\n
ERROR: Names must be unique. Backtrace: \n1. ggstatsplot::ggwithinstats(...) \n27. vctrs:::validate_unique(names = names) \n28. vctrs:::stop_names_must_be_unique(which(duplicated(names))) \n29. vctrs:::stop_names(...) \n30. vctrs:::stop_vctrs(...)\n
Run Code Online (Sandbox Code Playgroud)\n\n

我检查了回溯:

\n\n
33.stop(fallback)\n32.signal_abort(cnd)\n31.abort(message, class = c(class, "vctrs_error"), ...)\n30.stop_vctrs(message, class = c(class, "vctrs_error_names"), locations = locations, ...)\n29.stop_names("Names must be unique.", class = "vctrs_error_names_must_be_unique", locations = locations)\n28.stop_names_must_be_unique(which(duplicated(names)))\n27.validate_unique(names = names)\n26.vctrs::vec_as_names(names, repair = "check_unique")\n25.withCallingHandlers(expr, simpleError = function(cnd) { abort(conditionMessage(cnd), parent = cnd) })\n24.instrument_base_errors(expr)\n23.doTryCatch(return(expr), name, parentenv, handler)\n22.tryCatchOne(expr, names, parentenv, handlers[[1L]])\n21.tryCatchList(expr, classes, …
Run Code Online (Sandbox Code Playgroud)

r r-package vctrs

1
推荐指数
1
解决办法
1万
查看次数

标签 统计

r ×1

r-package ×1

vctrs ×1