r语言 茎叶图 'x'必需为数值x=read.table("E://data.txt")> xV1 V21 math stat2 81 723 90 904 91 965 74 686 70 827 73 788 88 899 78 8210 95 9611 63 75> stem(x$math)错误于stem(x$math) :'x'必需为数值为什么会报错?math 不就是 数值
来源:学生作业帮助网 编辑:作业帮 时间:2024/08/06 14:05:57
![r语言 茎叶图 'x'必需为数值x=read.table(](/uploads/image/z/14670904-40-4.jpg?t=r%E8%AF%AD%E8%A8%80+%E8%8C%8E%E5%8F%B6%E5%9B%BE+%27x%27%E5%BF%85%E9%9C%80%E4%B8%BA%E6%95%B0%E5%80%BCx%3Dread.table%28%22E%3A%2F%2Fdata.txt%22%29%3E+xV1+V21+math+stat2+81+723+90+904+91+965+74+686+70+827+73+788+88+899+78+8210+95+9611+63+75%3E+stem%28x%24math%29%E9%94%99%E8%AF%AF%E4%BA%8Estem%28x%24math%29+%3A%27x%27%E5%BF%85%E9%9C%80%E4%B8%BA%E6%95%B0%E5%80%BC%E4%B8%BA%E4%BB%80%E4%B9%88%E4%BC%9A%E6%8A%A5%E9%94%99%3Fmath+%E4%B8%8D%E5%B0%B1%E6%98%AF+%E6%95%B0%E5%80%BC)
xj@_ ĘH+_#\"1,ec[mhK-RJ$&odBiq_7g9=ݾ7nW4$sZe]SYCiD0
Pi$
5j-hBP
D.RH,H|"BDN !(B4$ #.8^Q|J{p8l"~v-,y7𢡄oȆ8'uf_H _bЖ2^S9!Ta0FZ#LQJmK#uNq"3mE?V|
r语言 茎叶图 'x'必需为数值x=read.table("E://data.txt")> xV1 V21 math stat2 81 723 90 904 91 965 74 686 70 827 73 788 88 899 78 8210 95 9611 63 75> stem(x$math)错误于stem(x$math) :'x'必需为数值为什么会报错?math 不就是 数值
r语言 茎叶图 'x'必需为数值
x=read.table("E://data.txt")
> x
V1 V2
1 math stat
2 81 72
3 90 90
4 91 96
5 74 68
6 70 82
7 73 78
8 88 89
9 78 82
10 95 96
11 63 75
> stem(x$math)
错误于stem(x$math) :'x'必需为数值
为什么会报错?math 不就是 数值么?
r语言 茎叶图 'x'必需为数值x=read.table("E://data.txt")> xV1 V21 math stat2 81 723 90 904 91 965 74 686 70 827 73 788 88 899 78 8210 95 9611 63 75> stem(x$math)错误于stem(x$math) :'x'必需为数值为什么会报错?math 不就是 数值
首行问题,即math,stat这两个标签,
使用read.table("E://data.txt",header = TRUE) 应该就可以了