Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

R Tools and pdftools not found

Archaeopteryx
10 - Fireball

Hi,

I've upgraded the sub version of 2020.3 ( can't upgrade further yet ) to allow R Tool and pdftools. 

I've installed the R Installer three times but I still receive the following error on all R Tools:

 

R (34) Error in loadNamespace(name) : there is no package called 'pdftools'
R (34) Execution halted
R (34) The R.exe exit code (1) indicated an error.

 

The following is how I configured the R Tools:

 

# read in the PDF file location which must
# be in a field called FullPath
data <- read.Alteryx("#1",mode="data.frame")

# Use pdf_text() function to return a character vector
# containing the text for each page of the PDF
txt <- pdftools::pdf_text(file.path(data$FullPath))

# convert the character vector to a data frame
df_txt <- data.frame(txt)

# output the data frame in steam 1
write.Alteryx(df_txt, 1)

 

I appreciate any assistance with debugging.

Thank you,

Chris

 

2 REPLIES 2
gabrielvilella
14 - Magnetar

Hi @Archaeopteryx, you need to install the extra R packages in onder to get the PDF tool working. Follow these steps:

  1. Go to C:\Program Files\Alteryx\R-3.4.4\bin (the version may differ)
  2. Right click on the “R.exe” file and select “Run as administrator”
  3. Enter the following commands

 

install.packages(“Rcpp”)
install.packages(“pdftools”)

 

You will be prompted to select a “cran mirror”, select any (though note some cran mirrors will not be able to provide the “pdftools” package and you may get an error message).

 

  • Upon completion you should receive a message in the command prompt saying “package pdftools successfully unpacked and MD5 sums checked”. If you do not receive this message use stackoverflow or the Alteryx community to begin debugging.
  • Run Alteryx and see if it works.
Chawnan
6 - Meteoroid

Hi Gabriel,

 

Referring your reply, i installed the packages for Alteryx 2021.2 version which supports R version 4.0.4 using the R.exe, found in subfolder i386 within the bin folder. 

I am successfully able to install the packages but when i am running my workflow now, its not even searching for any R version and returning nothing, not even an error.

 

I used to run this workflow previously on Alteryx version 2019, R version 3.5.3. There it used to search for the mentioned R version which i could see in the messages and if the pdftools packages were there then it used to return the output else used to return an error message.

 

Please suggest if you have an idea.

Labels
Top Solution Authors