tabulapdf icon indicating copy to clipboard operation
tabulapdf copied to clipboard

Allow text extraction via extract_areas

Open tpaskhalis opened this issue 8 years ago • 0 comments

With the addition of area argument in extract_text in https://github.com/ropensci/tabulizer/commit/7ba120a66ff9e4a0cc06b84f860bdd52bbbe3ecd it would be good to allow the location of text and its extraction in one line.

So, instead of

area <- locate_areas(f)
text <- extract_text(f, area = area)

It would be just:

text <- extract_areas(f, what = "text")

With the default being:

text <- extract_areas(f, what = "table")

The only caveat is argument guess, which does not exist in extract_text, but is conveniently False by default. I guess the function will have to throw a warning if user supplies both what = "text" and guess = TRUE and ignore it.

tpaskhalis avatar Apr 11 '18 19:04 tpaskhalis