Check the names of every file in the working directory
First, we will check how many files are available in our directory so for that, we will use list.files() function so it will check how many files are present in our current directory.
R
list.files () |
Output:
[1] "benchmark.png" "dashboard.pbix" "data.csv"
[4] "data.xlsx" "desktop.ini"
Now we will check whether the particular file is existing or not in our directory. for that, we have several methods.
How to check if a file already exists in R ?
In this article, we will discuss how to check if a file already exists or not using R Programming Language.
Directory in use:
Contact Us