Do you use Alteryx in a language other than English? If so, we want to hear from you! Please help us improve the international experience of our products by participating in this 5 minute survey.

We are updating the requirements for Community registration. As of 7/21/21 all users will be required to register a phone number with their My Alteryx accounts. If you have already registered, you will be prompted on your next login to add your phone number.

Alteryx Analytics Hub

Find answers, ask questions, and share expertise about Alteryx Analytics Hub.

Error in installing R packages

Vignesh_07
5 - Atom

Hi,

 

I have Four scenarios on installing packages in R console from Alteryx Designer- Out of which three of them fails and shows the error-Error: R (1): Error in install.packages("package name") : unable to install packages.

 

Scenario- 1- Trying to install fpp2 package

I used a simple code- install.packages("fpp2") to install fpp2 package- it failed

 

Scenario- 2- Trying to install fpp2 package- using conditional install

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

It failed saying couldn't install the package

 

Scenario- 3- Trying to install data.table package

I used a simple code- install.packages("data.table") to install data.table package- it failed

 

Scenario- 4- Trying to install data.table package using conditional install

cond.install <- function(package.name){
options(repos = "http://cran.rstudio.com")
if(package.name%in%rownames(installed.packages())==FALSE) {
install.packages(package.name)}else{require(package.name, character.only = TRUE)}}
cond.install("data.table")
library("data.table")

It compiled with no error

 

So if anyone could help me on how to install packages in R and why does the simple install.package code fails while installing both packages and conditional install works fine only with data.table package.

 

Please help me with the best method to install packages in R console from Alteryx Deisgner.

As i'm new to this and trying to learn.

 

We use Alteryx Designer 2020.2 and Alteryx Predictive tools with R 3.6.3- Admin version

 

Please advise

 

Thank you

 

 

 

0 REPLIES 0