• R语言
  • 怎么导入字txt中的字符型数据

z.txt中是字符型变量,如A,B,C等

执行z<-scan("F:/z.txt")后

显示:错误于scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, :   scan()需要'a real',

该怎么把数据读入变量z中?
> z<- read.csv("a.txt",header=FALSE)

> z

V1 V2 V3

1 我 是 辉

2 我 是 辉

>



我不明白作者的意思。有帮助吗?