Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I count the number of files read into this list?

Tags:

list

r

counting

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?

like image 239
user2654764 Avatar asked Oct 18 '25 11:10

user2654764


1 Answers

Yes, length(f) will give you the number of file names in f.

like image 73
NPE Avatar answered Oct 20 '25 01:10

NPE