如何解决在 R 中排除后重新出现异常值
所以我正在为我的论文分析一些有关细胞培养的数据,我正在研究细胞形态。关于细胞表面积,我通过简单的子集化排除了一些异常值。下面是一些有代表性的代码:
function SetMemberListFilterFromCookie() {
if ($(".MemberListPage").length > 0) {
var cookieValue = readCookie("searchFilterCookie"));
if (cookieValue) {
getMembers(cookieValue);
var array1 = cookieValue.split("&");
var array2 = [];
for (var i = 0; i <= array1.length - 1; i++) {
array2.push(array1[i].split("="));
}
// This section seems to be an issue in CHROME
// CheckBoxes are not always checked on page load
for (var c = 0; c < array2.length; c++) {
var id = array2[c][0] + "-" + array2[c][1];
$("#" + id).prop("checked",true);
}
// checkBox panels are initially hidden on page
// if any checkBoxes within a filterPanel have been checked,the filterPanel is opened.
var filterPanels = $(".filter-panel ul");
filterPanels.each(function() {
var checked = $(this).find("input:checked");
if (checked.length > 0) {
animateFilterSection($(this).prev());
}
});
}
}
}
function animateFilterSection(btn) {
btn.next("ul").slidetoggle({
duration: 100,complete: function() {
btn.toggleClass("plus minus");
}
});
}
function readCookie(name) {
var nameEQ = encodeURIComponent(name) + "=";
var ca = document.cookie.split(";");
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charat(0) === " ")
c = c.substring(1,c.length);
if (c.indexOf(nameEQ) === 0)
return decodeURIComponent(c.substring(nameEQ.length,c.length));
}
return null;
}
library(ggpubr)
random <- data.frame(x = c(sample(1:20,40,replace = TRUE),30),y = c(sample(1:20,30,52))
Boxplot(random)
random2 <- subset(random,random < 21)
Boxplot(random2)
此后的箱线图(使用 compare_means(x~y,data=random2,method="wilcox.test",paired = FALSE,group.by = NULL,ref.group = NULL)
Boxplotrandom <- ggBoxplot(random2,x = "x",y = "y")
Boxplotrandom <- Boxplotrandom + stat_compare_means()
Boxplotrandom
)看起来不错,但是当我执行 wilcoxon 有符号秩检验并使用 Boxplot(random2)
为结果制作箱线图时,我再次得到异常值。我怎样才能摆脱这些?
提前致谢。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。