Alteryx Designer Desktop Discussions

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

Error in installing packages for the R tool in Alteryx

Aravind_07
5 - Atom

Hi,

 

I have the Alteryx designer 2020.2 x64 and Alteryx Predictive tools with R 3.6.3(correct version for the designer).

Im trying to install some of the packages for my analysis and getting the following error

 

I have ran the Alteryx designer and the WF with admin privileges 

 

Error: R (2): Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) 

Execution halted.

 

Error 1.pngError 2.pngI have used the correct Alteryx R library path to install these packages. 

 

 

cond.install <- function(package.name){
options(repos = "http://cran.rstudio.com")
if(package.name%in%rownames(installed.packages())==FALSE) {
install.packages(package.name,lib="C:\\Program Files\\Alteryx\\R-3.6.3\\library")}else{require(package.name, character.only = TRUE)}}

cond.install("xlsx")
cond.install("tidyverse")
cond.install("tibbletime")
cond.install("anomalize")
cond.install("timetk")
cond.install("dplyr")
cond.install("fpp3")
cond.install("openxlsx")
cond.install("lubridate")
cond.install("tibble")
cond.install("norm")
cond.install("data.table")
library("tidyverse")
library("data.table")
library("tibbletime")
library("dplyr")
library("timetk")
library("anomalize")
library("lubridate")
library("openxlsx")
library("tibble")
library("norm")
library("ggplot2")

 

 


 Could someone please help me how to rectify this issue as im stuck with this

 

Thank you,

Aravind

1 REPLY 1
KaneG
Alteryx Alumni (Retired)

Hi,

 

I'm not entirely sure what has gone wrong here as that error can happen for a variety of reasons from unwanted spaces to versions.

 

The attached macro is what I use to install packages, although I have not used it in a long time and so hope that it still works.

Labels