r - ggplot/ggscatter 的问题
问题描述
我的目标是在下面的快照中可视化名为 Width_Dens 的数据帧上的 pearson 测试结果。我无法复制数据框,因为它太大了,所以希望这张照片能清楚地说明。为了可视化我的数据的 pearson 测试结果,使用了以下脚本:
ggscatter(Width_dens, x = "Width", y = "Density",
add = c("reg.line"), conf.int = TRUE,
cor.coef = TRUE, cor.method = "pearson")
xlab = "Canal Width (m)", ylab = "Plastic density ( m^-2)")
它给出了以下错误:
Don't know how to automatically pick scale for object of type units. Defaulting to continuous.
Error in Ops.units(x, range[1]) :
both operands of the expression should be "units" objects
有人知道这段代码有什么问题吗?或者也许是另一种绘制类似图表的方法?
解决方案
推荐阅读
- python - 从 shell 脚本 ubuntu 在新窗口中运行 Python 脚本
- javascript - 我正在上传路径遍历文件,在我的代码中出现警告
- kubernetes - 在 Kubernetes pod 上拒绝到 Internet 的出口流量
- wordpress - WordPress 中的漂亮网址
- delphi - 为 Delphi 创建一个带有 LinkGridToDataSource 的 Livebinding 控件
- java - 当有 JPanel 时,具有 .exe 文件的 Java 项目不会运行
- wordpress - WordPress TinyMCE 编辑器删除 BR 标签
- scripting - Photoshop 脚本文件名/后缀
- spring-webflux - 无法使用 WebClient 上传文件的内容 ( Flux
) 被包裹在另一个对象中 - selenium - 在启用 Javascript 和 Cookie 的情况下使用 Selenium?