tm package on R

I am trying to use the package tm for text mining, but it says it is not available for my version of R. This is what happens when I install the package and its dependencies:
1.
"Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘Rpoppler’
Do you want to attempt to install these from sources? (Yes/no/cancel)"

  1. if i say yes, at some point it says:

"During startup - Warning messages:
1: Setting LC_TIME failed, using "C"
2: Setting LC_MESSAGES failed, using "C"
3: Setting LC_MONETARY failed, using "C"

  • installing source package ‘Rpoppler’ ...
    ** package ‘Rpoppler’ successfully unpacked and MD5 sums checked
    ** using staged installation
    checking for pkg-config... no
    configure: error: cannot find pkg-config
    ERROR: configuration failed for package ‘Rpoppler’
  • removing ‘/Users/andrianaloredan1/Library/R/x86_64/4.1/library/Rpoppler’
    Warning in install.packages :
    ** installation of package ‘Rpoppler’ had non-zero exit status**"

Is there any way I can solve this error?
Or is tm not available for the most recent version of R/Rstudio? (i tried both and i got the same error for both)

You are missing a system dependency, you haven't told us what operating system you are using but you can simply google "how to install pkg-config in (your operating system)".

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.