如何计算读入此列表的文件数? [英] How do I count the number of files read into this list?
本文介绍了如何计算读入此列表的文件数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一堆的csv文件正在读取,如下所示:
I have a bunch of csv files that I am reading into a list like this:
f <- list.files(pattern="201\\d{5}\\.csv")
有什么方法可以计算我正在读取的文件数量?
Is there any way to count how many files that I am reading in?
推荐答案
是的,length(f)
将为您提供f
中的文件名数量.
Yes, length(f)
will give you the number of file names in f
.
这篇关于如何计算读入此列表的文件数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文