Message-ID: <89cdf269-4882-6c45-40b0-8d851e8f2e60@gmail.com>
Date: 2018-12-15T00:53:14Z
From: John C Nash
Subject: listing all files in a directory ending in ".xxx" in a script
In-Reply-To: <ac9701a3-5435-260d-9736-e17c478531fa@gmail.com>
Apologies for list noise. I just found a subtle typo so the command
was different from what it appeared to be in the actual use-case.
dir() seems to be working OK once that was fixed.
JN
-------- Forwarded Message --------
Subject: listing all files in a directory ending in ".xxx" in a script
Date: Fri, 14 Dec 2018 19:33:25 -0500
From: J C Nash <profjcnash at gmail.com>
To: r-help <r-help at R-project.org>
When in a console (I was in Rstudio) I can run
dir("../provenance-of-rootfinding/", pattern="\\.Rmd")
to list all Rmd files in the specified directory.
However, when I try to run this in a script under
Rscript --vanilla
I don't get the files to list.
Am I missing something obvious that I should know about?
JN