r中怎么导入excel数据进行时序图检验

如题所述

1.首先在R中安装RODBC包,并载入该包install.packages("RODBC")library(RODBC)
2.导入excel到连接对象中channel <- odbcConnectExcel("Example.xls")
3.将对应excel sheet中的数据导入到一个数据框中,并关闭ODBC连接mydataframe <- sqlFetch(channel,"Sheet1")odbcClose(channel)
4.查看结果> mydataframe StudentID Gender Age1 1 M 152 2 F 163 3 M 144 4 M 155 5 F 16
酷睿软件园为你解答。
温馨提示:答案为网友推荐,仅供参考
相似回答