各位高手,我在EXCEL里录入了一大堆数据,准备用来练习R的,但不知怎么才能导入到R中,用read.table()好像只能导入*.dat格式的数据,请哪位高手教我怎么办!!!
另外,在R中怎么直接录数据啊?比如我的数据有五个变量,25个样本,第一个变量是年份,其它的都是number类型的,数据中含有缺失值的
还帮我看一下我的R命令中有什么问题,谢谢.
> data<-read.table("c:\\windows\\desktop\\111.dat",header=ture)
错误在file(file, "r") : 无法打开链结
此外: Warning message:
无法打开文件'No such file or directory',因为'c:\windows\desktop\111.dat'
> data<-read.table("c:\\windows\\111.dat",header=ture)
错误在file(file, "r") : 无法打开链结
此外: Warning message:
无法打开文件'No such file or directory',因为'c:\windows\111.dat'
> data<-read.table("c:/windows/111.dat",header=ture)
错误在file(file, "r") : 无法打开链结
此外: Warning message:
无法打开文件'No such file or directory',因为'c:/windows/111.dat'
> data<-read.table("c:/111.dat",header=ture)
错误在read.table("c:/111.dat", header = ture) :
找不到这个目标对象"ture"
> data<-read.table("c:/111.dat",header=TURE)
错误在read.table("c:/111.dat", header = TURE) :
找不到这个目标对象"TURE"
> data<-read.table("c:/111.dat",header=FALSE)
错误在scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, :
2行没有6单元
> data<-read.table("c:/111.dat")
错误在scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, :
2行没有6单元
[此贴子已经被作者于2007-3-8 11:02:00编辑过]