[R] error "The system cannot find the file specified..."

Bert Gunter bgunter@4567 @end|ng |rom gm@||@com
Sun Sep 23 02:45:55 CEST 2018

You probably want pattern = "\\.PDF" , as "." has a special meaning for
regex's. However, that really shouldn't make any difference.

Obvious questions:
1. dir() returns a vector of file names. Are they pdf's "PDF" or "pdf"
(case matters!) ?
2. extract.tables() almost certainly wants the full path names to the
files, not just the file names, if your working directory isn't set to the
directory containing the files. So what does getwd() give?


Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )

On Sat, Sep 22, 2018 at 4:22 PM Ek Esawi <esawiek using gmail.com> wrote:

> Hi All,
> I am using the R Tabulizer package to extract tables from a set of pdf
> files. Tabulizer creates a list of data frames; each corresponds to a
> table in a file. My aim is to create a list of lists, one for each
> file.i have 8 files
> The code below kept giving me the error "Error in
> normalizePath(path.expand(path), winslash, mustWork) : path[1]="April
> 24.PDF": The system cannot find the file specified". But when i used
> table_extract (file) for individual files, it works perfectly.
> Any help is greatly appreciated.
> EK
> path = "C:/Users/name/Documents/TextMining/"
> file.names <- dir(path, pattern =".PDF")
> A <- vector("list", length(file.names))
> for(i in 1:length(file.names)){
>   A[i] <- extract_tables(file.names[i])}
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

	[[alternative HTML version deleted]]

More information about the R-help mailing list