[R] Error: C stack usage is too close to the limit when using list.files()
Ben Bolker
bbolker at gmail.com
Fri Sep 27 21:36:57 CEST 2013
Jonathan Greenberg <jgrn <at> illinois.edu> writes:
>
> R-helpers:
>
> I'm running a file search on my entire drive (Mac OS X) using:
>
> files_found <-
list.files(dir="/",pattern=somepattern,recursive=TRUE,full.names=TRUE)
> where somepattern is a search pattern (which I have confirmed via a
> unix "find / -name somepattern" only returns ~ 3 results).
>
> I keep getting an error:
>
> Error: C stack usage is too close to the limit
>
> when running this command. Any ideas on 1) how to fix this or 2) if
> there is an alternative to using list.files() to accomplish this
> search without resorting to an external package?
I assuming that using
system("find / -name somepattern")
(possibly with intern=TRUE) isn't allowed? (I don't know what you're
trying to do, but if you don't need it to work on Windows-without-cygwin,
this should work across most Unix variants (although a "-print" might
be required)
More information about the R-help
mailing list