在 shell 中,制作一个目录:
mkdir /home/test
然后,在“/home/test”中创建一个名为“.test”的文件
a=list.files(path = "/home/test",include.dirs = FALSE)
a
character(0)
a=list.files(path = "/home/test",include.dirs = TRUE)
a
character(0)
a=list.files(path = "/home/test/",include.dirs = TRUE)
a
character(0)
list.files(path = '/home/test', all.files=TRUE,inclued.dirs=FALSE)
[1] "." ".." ".test"
a=list.files(path = '/home/test', all.files=TRUE)
length(a)
[1] 3
我怎样才能得到length(a)
= 1 使用正则表达式参数pattern=
来list.files
修剪.
和..