- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我成功地使用 boxplot
函数来生成...箱线图。现在我需要生成包含 boxplot
计算的统计数据的表,以便创建绘图。
我通过使用 plot=FALSE
选项来做到这一点。
问题是这产生了一种相当奇怪的格式的数据,我根本无法做任何事情。下面是一个例子:
structure(list(stats = structure(c(178.998262143545, 182.227431564442,
202.108456373209, 220.375358994654, 221.990406228232, 216.59986775699,
217.054997032148, 228.509462713206, 267.070720949859, 284.832378859975,
189.864120937198, 201.876421960518, 219.525439081472, 234.260088973545,
279.343359793024, 209.472617639903, 209.526516071858, 214.785213079737,
230.027361556731, 240.0647114578, 202.057148813419, 207.375619207685,
220.093663781351, 226.246698737471, 240.343646265795), .Dim = c(5L,
5L)), n = c(4, 6, 8, 4, 8), conf = structure(c(171.971593703341,
232.245319043076, 196.247705331772, 260.771220094641, 201.435457751239,
237.615420411705, 198.589545146688, 230.980881012787, 209.552007821332,
230.635319741371), .Dim = c(2L, 5L)), out = numeric(0), group = numeric(0),
names = c("U", "UM", "M", "LM", "L")), .Names = c("stats", "n", "conf", "out", "group",
"names"))
最佳答案
boxplot
在 R 中返回一个名为 list
的结构体.
列表或多或少是一个数据容器,您可以在其中按名称引用元素。
如果你这样做 A <- boxplot(...)
,您可以访问 names
与 A$names
, conf
与 A$conf
, 等等。
所以,看着 boxplot
帮助文件 ?boxplot
下 Value:
(它告诉你 boxplot
返回什么),我们看到它返回一个包含以下组件的列表:
stats: a matrix, each column contains the extreme of the lower
whisker, the lower hinge, the median, the upper hinge and the
extreme of the upper whisker for one group/plot. If all the
inputs have the same class attribute, so will this component.
n: a vector with the number of observations in each group.
conf: a matrix where each column contains the lower and upper
extremes of the notch.
out: the values of any data points which lie beyond the extremes
of the whiskers.
group: a vector of the same length as ‘out’ whose elements indicate
to which group the outlier belongs.
names: a vector of names for the groups.
A$stats
中,每列属于一个组,包含最小值、下四分位数、中位数、上四分位数和最大值。
A <- boxplot(...)
mytable <- A$stats
colnames(mytable)<-A$names
rownames(mytable)<-c('min','lower quartile','median','upper quartile','max')
mytable
mytable
):
U UM M LM L
min 178.9983 216.5999 189.8641 209.4726 202.0571
lower quartile 182.2274 217.0550 201.8764 209.5265 207.3756
median 202.1085 228.5095 219.5254 214.7852 220.0937
upper quartile 220.3754 267.0707 234.2601 230.0274 226.2467
max 221.9904 284.8324 279.3434 240.0647 240.3436
mytable['min','U']
.
关于r - 如何将 boxplot 的数字输出(带有 plot=FALSE)变成可用的东西?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8844845/
我已经阅读了这个答案https://stackoverflow.com/a/45486495/1108891 ,它演示了元组类型推断。经过一些实验,我遇到了这种情况。 当我们的 tuple 函数有 T
我想删除零, 我喜欢这个模型,如果我输入 1000 然后额外的表显示从 1 到 1000 的所有数字,每个数字都会检查并删除零。 示例:如果我输入 10然后输出如 1 2 3 .....8 9 1(1
鉴于我对PowerShell的了解仍在开发中,请与我一起提出任何建议/答案。 因此,在我工作的地方我们工作的公司拥有大量日文机器,需要注册Intune。但是,我们正在运行的脚本无法在其计算机上运行,
我刚刚制作了一个将路径保存到 INI 文件中的小程序。 但是在输出中,路径是这样写的: C:\\Windows 我想这样写: C:\Windows 我用 string.replace 尝试了很多方法,
所以我尝试 std::replace(diff_path.begin(), diff_path.end(), "\\", "/"); 但它似乎无法在我的 Visual Studio 上编译.怎么办 -
我使用以下代码每 30 秒自动抓取/设置最新的页面标题: setInterval(function() { var data = "http://mysite.com/mypage
我希望有两个 View 是组成集的一部分。每个 View 中的数据最好在 UITableView 中表示。然后,我想添加一个手势来使 View 在屏幕上闪烁,并引入另一个类似的 View ,并带有页面
我正在尝试开发一个小游戏,但我遇到了以下问题:我有一个伪类“Cannon”,每个 Cannon 都有一个存储它应该守卫的区域的数组和一个存储“入侵者”的数组进入其中一个戒备区。我创建了下一个函数作为
当我从应用程序中进行插入时,所有 ★(星号)都会变成“â…” 如何阻止这种情况发生? *如果我直接通过 phpmyadmin 插入它,它就可以工作,但使用这个 php 时则不行: connect_er
我遇到了一个奇怪的问题,将 NSDictionary 存储到 NSUserDefaults,然后检索它会将其转换为 NSCFString。 这是我保存数据的地方: - (void)saveProgre
我正在尝试像这样向 coinbase api 发出请求 $url = "https://api.gdax.com/products/BTC-USD/candles?start=".date($form
我在 HTTP header 中使用 if-modified-since 来决定是否应该下载文件。应用程序已经过测试,一切正常,但现在当我询问我的 NSHTTPURLResponse 实例 respo
我向串口发送0xFF 结果是 0x3F。 所有其他字节都是正确的。 情况是这样的…… 外部盒子将这些字节发送到 PC... 0xFF, 0x0D, 0x00, 0x30, 0x31, 0x53, 0x
所以我在我的 Next JS 应用程序中遇到了这个奇怪的问题,我导入了谷歌字体,如下所示 在我的浏览器中显示的不是 href,而是 data-href="...",所以问题是谷歌无法将此识别为链接
我试图通过将 QRect 变成 QPolygon 来检查 QPolygon 和 QRect 之间的碰撞。但是,矩形也可能有我添加的旋转,所以我想知道如何将 QRect 变成 QPolygon 并考虑到
我正在尝试写一个 Conduit使用 attoparsec解析器。具体来说,给定 parseOne :: Parser T , 我想构建一个 Conduit ByteString m T重复地将解析器
标记内的超链接
我正在尝试添加 和 所以实际的文字出现在我的页面上。不是链接。 所以我希望在我的页面上显示实际的 HTML,如下所示: 目前,出现了一个死图像...我想 单独阻止了这一点,只是显示了普通的html?
最近发现一些路由器设备包含后门,some of which可以通过单个UDP数据包加以利用。我意识到其中一些后门不一定是恶意的,因为我在自己的产品中也做了同样的事情以进行故障排除:打开套接字将心跳数据
我知道我可以将 iOS 设备变成 iBeacons ( Can an iOS7 device act as an iBeacon? )。不幸的是,我只有一台设备,我的信标还没有到达。所以我想知道如何将
有没有人尝试过将 MAC 变成 iBeacon。我已经为 iOS 设备完成了此操作,并且想要一个类似的带有一些 UI 的 MAC 独立应用程序。我听说 Mavericks 上的新 API 支持 iBe
我是一名优秀的程序员,十分优秀!