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

Alteryx Designer Desktop Discussions

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

Install R Packages in Alteryx Deisgner

abhinav19
6 - Meteoroid

Please help.  I am getting below error when i try to install r packages in Alteryx

Code: install.packages(c("geosphere"), repos="http://cran.stat.nus.edu.sg/")

 

Error:

Info: R (4): Warning in install.packages(c("geosphere"), repos = "http://cran.stat.nus.edu.sg/") :
Info: R (4): 'lib = "C:/Program Files/Alteryx/R-3.4.4/library"' is not writable
Error: R (4): Error in install.packages(c("geosphere"), repos = "http://cran.stat.nus.edu.sg/") :
Info: R (4): unable to install packages
Error: R (4): Execution halted

16 REPLIES 16
DiganP
Alteryx Alumni (Retired)
abhinav19
6 - Meteoroid

Thanks @DiganP.  I downloaded the 'Install R Packages.yxwz'.  Now, I see below screen.  What do i do now.  Sorry if my question is very basic.  I am new to Alteryx.InstallRPackages.jpg

 

My default path is 'C:\Users\soniab\Documents\RPackages'

I need 'geosphere' and 'readxl' packages installed.

DiganP
Alteryx Alumni (Retired)

@abhinav19 you should see a magic wand that you can click on. You can type in the r package in the textbox and then select the default personal directory. After its installed, you should run the R package inside the R tool and the script will run as expected.

 

Capture.PNG

Digan
Alteryx
abhinav19
6 - Meteoroid

Thanks DiganP. It worked.  For those like me who don't know where the magic wand is....It is next to the green play button just below the menu options like 'File', 'Edit', etc.

abhinav19
6 - Meteoroid

Hi @DiganP,

The install worked but when i called the package, i got below error.  It may have to do with changing the default path of R package.  Can you please help me with that?

Code: library(readxl)

My custom path where i downloaded the packge is 'C:\Users\soniab\Documents\RPackages'

 

Info: R (4): The following object is masked from 'package:AlteryxRDataX':
Info: R (4): XMSG
Error: R (4): Error: package or namespace load failed for 'readxl' in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
Info: R (4): namespace 'Rcpp' 0.12.16 is already loaded, but >= 0.12.18 is required
Error: R (4): Execution halted
Error: R (4): The R.exe exit code (1) indicated an error.

MarqueeCrew
20 - Arcturus
20 - Arcturus
Find the c:\programs\alteryx r libraries and delete or rename the package library.

Cheers,

Mark

iPhone help
Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
abhinavsoni
6 - Meteoroid

Thanks Mark,

 

I went to this path but dont see the 'readxl' library.  Can you please elaborate?

abhinavsoni
6 - Meteoroid

C:\Program Files\Alteryx\R-3.4.4\library

alteryx_user
7 - Meteor

@DiganP @abhinav19 @MarqueeCrew 

I am stuck with a similar error. I am trying to install "readr" package for running XGboost macro

clipboard_image_0.png

can I get some help?

Thanks

Labels