list.files() does not work with valid path

I can list the files from a folder from the command line using the ls() command. However if the path is used as input to the list.files command in R Studio. The respond is character(0).


Referred here by Forecasting: Principles and Practice, by Rob J Hyndman and George Athanasopoulos

in R use the following code, to be enabled to browse to the path of interest using your file systems chooser, and then look at the resulting string path, and compare with what you had attempted prior.

(mydir <- choose.dir())

You could use this for list the file:

list.files('C:/Users/bob/Documents/my_data_files') # change for a valid path in you PC.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.