Learn more about the Alteryx Maveryx Universe recently announced at Inspire 2023!

Alteryx Designer Desktop Discussions

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

R Tool: readLines function fails with "large" files

12 - Quasar

Hello peoples!
I have some code in R Studio that takes the path of a file, opens it, uses gsub to replace some strings, then writes over the original file.  It works great there, even with the file with 189,000 lines

But when I attempt it in the R Tool, any file greater than 1000 to 2000 lines has only a single line with ? as the file contents in the variable.  (Sorry I can't be specific about the boundary between "this is great" and "wait, what just happened."  Tiny files are fine; a few thousand lines are not.)


alterYX <- readLines(as.character(replacement[i,1]), warn = FALSE, n = -1L)


Are there any super secret configurations to allow file size > tiny?

Running Designer 2020.3, with R.version.string returning R version 3.6.3 (2020-02-29) in both R Studio and Alteryx.


Thank you for your time.



15 - Aurora

Hi @David-Carnes,


Just going through some old unanswered questions.  One thing you could peek at is the amount of memory you're allowing Alteryx... (e.g. see some of the User Settings mentioned here.)


(A side thought is why use the R tool for, essentially, a string replacement? That's the sort of thing Alteryx is really great at doing.)


Hope that helps!