我已将x
和y
变量添加为
x = c(1, 2, 3, 4, 5, 6, 7, "8-14", ">14")
y = c(70, 43, 25, 10, 20, 72, 87, 32, 9)
当我输入命令
时barplot(y~x, mainlab= "Duration of car hire period for customers",
xlab= "Number of Days Rented", ylab= "Frequency")
它回来了
barplot.default出错(y~x,mainlab ="客户的租车期限为#34;,: '高度'必须是向量或矩阵
有人可以解释一下吗?