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.
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.
I am tying to read R data files (.RData) into Alteryx. I use this code in the R tool:
write.Alteryx(readRDS("C:/Users/user/Desktop/Alteryx Data/July 2018, Single Cell Exp/ALL_8_SAMPLES/Riley_1904_170.RData"), 1)
This error gets returned
Error: R (1): Error in readRDS("C:/Users/user/Desktop/Alteryx Data/July 2018, Single Cell Exp/ALL_8_SAMPLES/Riley_1904_170.RData") : Info: R (1): unknown input format Info: R (1): Calls: write.Alteryx -> readRDS Error: R (1): Execution halted Error: R (1): The R.exe exit code (1) indicated an error.
Does the readRDS code itself work fine in R? I believe when using filepaths you must escape forward slashes so every / should actually be //
Also is the comma supposed to be in the filepath?
As an alternative you may wish to try reading this file type into Alteryx with a standard input data tool, when you navigate to try and find your file it won't show, but at the bottom of the menu where it says 'all data files, change this option to 'all files' and your rdata file should then appear.
The file path name was correct, but I changed the file name to remove the ',' and redid the code as suggested:
write.Alteryx(readRDS("C://Users//creily//Desktop//Alteryx Data//July 2018 Single Cell Exp//Riley_1904_170.rds"),1)
I received this new error this time.
Error: R (1): Error in as.list.default(X) : Info: R (1): no method for coercing this S4 class to a vector Info: R (1): Calls: write.Alteryx ... encodeForWrite -> sapply -> lapply -> as.list -> as.list.default Error: R (1): Execution halted Error: R (1): The R.exe exit code (1) indicated an error.
The normal input tool does not seem to recognize this RData file type.
I did remove the writeAlteryx part, and the R script ran without errors. However, with the Browse tool, there was no saved data. While running, I saw the data go through the message box, so it was reading it. Is there a way to store it? I tried:
Got a response from DavidxL that showed up in my email, but not on this discussion page. The RData matrix is a complex object, so I will try and pull in each sub-matrix within it and try to assign to some objects. Will probably generate more questions!
The database in R I was working with is a S4 class type, so Alteryx had no ability to properly extract. I do some pre-transformations on the data in R, and then extract the sub-matrices of interest out as separate files that are more readable. Thanks!