我正在使用具有summary_table函数的qwraps2软件包。由于某些原因,当我运行以下代码时,出现错误“错误:FirebaseFirestore.getInstance().collection("BranchWiseList")
.get().addOnCompleteListener(task -> {
if(task.isSuccessful()){
QuerySnapshot querySnapshot = task.getResult();
assert querySnapshot != null;
for (DocumentSnapshot documentSnapshot:
querySnapshot.getDocuments()) {
documentSnapshot.getID()
// here you can get everything done with the id.
}
}
});
必须是公式”。
x
答案 0 :(得分:1)
在~
行中似乎省略了"n" = sum(death_vs_gender$Deaths),
。
尝试以下操作:
our_summary1 <-
list("Table 2: Summary Statistics for Mass Shooting Deaths in American between 1966-2017 by Men & Women" =
list(
"n" = ~ sum(.data$Deaths),
"Min" = ~ min(.data$Deaths),
"Max" = ~ max(.data$Deaths),
"Median" = ~ median(.data$Deaths),
"Mean" = ~ mean(.data$Deaths),
"Std. Dev." = ~ sd(.data$Deaths)
)
)
请注意,名称death_vs_gender
已替换为.data
,即数据
tidyverse中的代词。这是一个重要的变化。使用代词将
将有助于防止由于范围问题而导致的错误结果。