首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >#表中的错误(StudentSurvey$Gender,StudentSurvey$Smoke):未找到对象'StudentSurvey‘

#表中的错误(StudentSurvey$Gender,StudentSurvey$Smoke):未找到对象'StudentSurvey‘
EN

Stack Overflow用户
提问于 2021-03-25 15:27:15
回答 1查看 23关注 0票数 0

所以,我尝试将一个R文档编织成一个超文本标记语言文件,但是,当编织时产生这个错误"#Error in table(StudentSurvey$Gender,StudentSurvey$Smoke):object 'StudentSurvey‘not found“

作为参考,这是我的R代码。

代码语言:javascript
复制
read.csv("StudentSurvey.csv")
barplot(table(StudentSurvey$Gender, StudentSurvey$Smoke), legend=TRUE)
boxplot(StudentSurvey$Pulse ~ StudentSurvey$Smoke , xlab = "Smoke" , ylab = "Pulse")

我不确定出了什么问题,我试图通过更改我的Rworking目录来解决问题,并确保"StudentSurvey.csv“在那里,但是这个问题似乎正在发生。如果不是很明显,我对R非常陌生,因为我是第一次在UNI中使用它,所以如果这是一个简单的修复,我很抱歉。

EN

回答 1

Stack Overflow用户

发布于 2021-03-26 03:46:44

您只需要将read.csv()的输出赋值给一个对象。

代码语言:javascript
复制
StudentSurvey <- read.csv("StudentSurvey.csv")
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66794897

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档