This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I'm getting mixed results between using Alteryx's R Tool vs Altery'x R Terminal (C:\Program Files\Alteryx\Alteryx\R-3.3.2\bin)
When I run the following code within Alteryx's R Tool, these are the results:
install.packages("readxl", repos = "http://cran.us.r-project.org", dependencies=TRUE) install.packages("tidyverse", repos="http://cran.rstudio.com/", dependencies=TRUE) install.packages("stringr", repos = "http://cran.us.r-project.org", dependencies=TRUE) install.packages("xlsx", repos = "http://cran.us.r-project.org", dependencies=TRUE) install.packages("binom", repos = "http://cran.us.r-project.org", dependencies=TRUE) install.packages("Rcpp", repos = "http://cran.us.r-project.org", dependencies=TRUE) library(readxl) #Read Excel files library(tidyverse) #Data manipulation library(stringr) #String manipulation library(xlsx) #Write Excel files library(binom) #Calculate Confidence Intervals for IIS data Info: R (1): Warning: package 'Rcpp' is in use and will not be installed Warning: R (1): package 'readxl' was built under R version 3.3.3 Error: R (1): Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : Info: R (1): namespace 'Rcpp' 0.12.8 is already loaded, but >= 0.12.13 is required Info: R (1): In addition: Warning message: Info: R (1): package 'tidyverse' was built under R version 3.3.3 Error: R (1): Error: package or namespace load failed for 'tidyverse' Error: R (1): Execution halted Error: R (1): The R.exe exit code (1) indicated an error.
However, when I run the same code within the R Terminal found in the bin folder, it works perfectly. Seems like the Alteryx R Tool should work if the Alteryx R Terminal works?
Alteryx R Tool .libPaths():
Info: R (1): R version 3.3.2 (2016-10-31) - x86_64
Info: R (1): rgeos version: 0.3-21, (SVN revision 540)
Info: R (1): GEOS runtime version: 3.5.0-CAPI-1.9.0 r4084
Info: R (1): Linking to sp version: 1.2-3
Info: R (1): Polygon checking: TRUE
Info: R (1): [1] "C:/Users/p474983/AppData/Roaming/Alteryx/R-library"
Info: R (1): [2] "C:/ProgramData/Alteryx/R-library"
Info: R (1): [3] "C:/Program Files/Alteryx/R-3.3.2/library"
Alteryx R Terminal .libPaths()
[1] "C:/Program Files/Alteryx/R-3.3.2/library"
Solved! Go to Solution.
I also tried to reinstall Rcpp and got this:
detach("package:Rcpp", unload = TRUE)
install.packages("Rcpp", dependencies=TRUE)
Error: R (1): Error: package 'Rcpp' is required by 'AlteryxRDataX' so will not be detached
I closed Alteryx and the R Terminal and then ran the following
detach("package:Rcpp", unload = TRUE)
install.packages("Rcpp", dependencies=TRUE)
Reopened Alteryx and was able to run my script.
If I am closing both R and Alteryx, where do I run the mentioned command?
I re-opened the R Terminal and ran the commands.
You installed using Alteryx's R Terminal? Not whichever you use for R Studio or something?
Are you using an Admin or Non-Admin version of Alteryx? Can you please try running .libPaths() in the R Tool, and seeing what file-paths are listed in the Results Window?
Following is my libPaths() output. I am using a non-admin Alteryx version. I have installed the required libraries to all those paths except the 2nd one.
R (1) [1] "C:/Users/ghoshalk2/AppData/Local/Alteryx/R-3.5.3/library"
R (1) [2] "\\\\145.230.101.194/vdc-rat$/FolderReDir/ghoshalk2/AppData/Roaming/Alteryx/R-library"
R (1) [3] "C:/ProgramData/Alteryx/R-library"
R (1) [4] "C:/Users/ghoshalk2/Documents/R/win-library/3.5"