New Alteryx user here,
I am testing if Alteryx can used for genetic analysis, and am attempting to use an R package within it that performs specific data normalization processes. The R package (Seurat) installs fine, but when I try and load it, library(Seurat), it returns an error:
Error: package 'Matrix' 1.2.12 was found, but >= 1.2.14 is required by 'Seurat'
The 'Matrix' package installed on Alteryx is 1.2.12 (I looked in the Alteryx file), when I attempt to update it using the R Install tool, it does not update it to 1.2.14 or higher, however, I get no error or warning codes when I do install.
I the tried to do a simple install call instead (install.packages("Matrix", repos = "http://cran.studio.com")). With this approach I get a warning saying:
package 'Matrix' is not available (for R version 3.4.4)
I did query for the R version in Alteryx, and it is 3.4.4. Based on the description from CRAN directory for Matrix, this R version should support this version of Matrix. As a side note, I do have R studio and R installed on my computer.
Solved! Go to Solution.
I keep getting a error when changing the .libpaths() to the R folder that is outside the Alteryx one. Here is the code I have in the R Alteryx module- .libpaths(C:\user\username\Documents\R)
Error: unexpected input in "libpaths(C:\"
Execution halted
The R.exe exit code (1) indicated a error
The R folder that is not in alteryx does have the updated Matrix though!
Fixed that problem, thanks, but then ran into another! Currently using
.libpaths("C:/Users/username/Documents/R")
Error in .libpaths("C:/Users/username/Documents/R"):
could not find function ".libpaths"
Do I need to load basic functions before trying to add scripts in Alteryx R?
It's the capitalization. Try .libPaths() [capital P]
If there are any packages already loaded by Alteryx and you want to load a newer version in your personal R library, you'll also run into an error.
Thanks, it did require capitalization, and I did get an error. Not sure how to get around this whole problem. Can I delete files in the Alteryx R lib set, and replace with a separate one?
I haven't personally tried that yet so I'm also interested to see how it turns out for you. There is a risk that updating one of those packages might break some Predictive Tool macro, so I would make sure to make a backup first before trying to update a package as @BenMoss suggested.
When I ran into a similar issue I opted to run my R script using the command tool instead because there were too many dependencies that required updating.
The Seurat package loaded without a problem! So I guess you can swap out the R package files for a different version. Have not tested other tool functionalities that may use the Matrix package, but so far so good. Thanks for the help everyone!