-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PDF with chisq fails with unclear error message due to extraction issue (improve message / use pdftools?) #84
Comments
In a larger set of files, this issue occurred another 8 times (e.g., However, pdftools failed to extract some tests (without causing errors) due to problems in reading multi-column layouts. Another tool that I tried (pdfminer.six) resolves that, but also fails with some chisq ... so for now, I would no longer recommend a change in the default PDF engine, but clearer error messages. Also, it might be worth recommending that users re-OCR PDFs that fail (or, if striving for completeness, all). For instance, statcheck does not find results in the following file due to issues with the |
This PDF file
10.1111:apps.12362.pdf
fails with
This is because the chisq tests get read as follows:
This is really odd
xpdf
-behaviour because I can copy-paste them from the PDF without trouble, so they seem to be embedded as characters rather than images.So, two questions here:
could not process "(2 (199) = 627.73"
then trouble-shooting would be much easier?(Getting this to work requires two minor pre-processing steps:
pdftools::pdf_text(f) |> paste(collapse = "") |> gsub("\n", "", _) |> statcheck:::extract_stats("chisq")
)
The text was updated successfully, but these errors were encountered: