I have thousands of text files and would like to know how to check if a particular file is empty. I am reading all the files using this line of code
Y<-grep(\
Use the following code to check if a file in the system is empty or not before uploading it.
my_file<-readLines(paste0("")) my_file=="" #TRUE - means the file is empty