首页 > 解决方案 > “x”必须是数字

问题描述

我有以下文件:

$ head orthoset.cov
87.0
55.4
80.6
56.8
78.4
41.2
44.9
96.7
83.0
67.9

但是,我未能使用以下代码创建直方图:

> chol <- read.table("~/orthoset.cov")
> hist(chol,xlab = "Weight",col = "yellow",border = "blue")
Error in hist.default(chol, xlab = "Weight", col = "yellow", border = "blue") : 
  'x' must be numeric

我错过了什么?

先感谢您,

标签: rggplot2histogram

解决方案


推荐阅读