将描述从Jamovi导出到R

x7rlezfr  于 2023-02-01  发布在  其他
关注(0)|答案(1)|浏览(143)

我正在使用Jamovi处理Excel文件中数据集的一些变量。

jmv::descriptives(
  formula = country ~ `voted`,
  data = bd,
  bar = TRUE,
  missing = FALSE,
  mean = FALSE,
  median = FALSE,
  sd = FALSE,
  min = FALSE,
  max = FALSE)

当我导入代码并尝试执行代码以获取图形时,出现以下错误:

Warning messages:
1: In FUN(X[[i]], ...) : no non-missing arguments to max; returning -Inf
2: In mean.default(x, na.rm = TRUE) :
  argument is not numeric or logical: returning NA
3: In mean.default(x, na.rm = TRUE) :
  argument is not numeric or logical: returning NA
4: In mean.default(x, na.rm = TRUE) :
  argument is not numeric or logical: returning NA
5: In var(if (is.vector(x) || is.factor(x)) x else as.double(x), na.rm = na.rm) :
  NAs introduced by coercion
6: In var(if (is.vector(x) || is.factor(x)) x else as.double(x), na.rm = na.rm) :
  NAs introduced by coercion
7: In var(if (is.vector(x) || is.factor(x)) x else as.double(x), na.rm = na.rm) :
  NAs introduced by coercion

我错过了什么?

p8h8hvxi

p8h8hvxi1#

我认为解决方案存在两个问题:
1.)formula = country ~ voted,应为formula = 'voted',country,因为Tilda左侧的变量是因变量。
2.)您应该指定data = data。
进一步援助:https://www.youtube.com/watch?v=mZomeS0tLxY

相关问题