In the following code I run the arulesSequences::cspade() function from RStudio (with and without administrator privileges) on a Windows 10 OS. In both cases it fails with the error below.
It works from Rterm (with admin privileges) and also from RStudio under Ubuntu. However, I need to get it working in RStudio under Windows 10...
Any help regarding solutions, workarounds or other hints is very much appreciated!
PS: I might be able to get further admin support from my company to fix issues regarding permissions. However, they are not experienced in R. So any hints regarding possible permission issues would also be helpful.
PPS: Not sure if this is a general, an IDE or an Admin question. Pls. feel free to move this appropriately.
We are not seen any error messages, what is your expected result?
Could you please turn this into a self-contained REPRoducible EXample (reprex)? A reprex makes it much easier for others to understand your issue and figure out how to help.
It seems to turn out, that it works via reprex(), since reprex() runs it's code directly via RTerm, as can be seen under Session info, in the rendered output when si = TRUE in the reprex() call.
So I think one brute force solution would be to write a function which wraps reprex::reprex(), which then just sources the main work (read a .RDS file, run cspade(), write a .RDS file).
However, this doesn't seem elegant and heavily dependent on reprex and possibly further environment settings. So, ideally someone could point me to a way to source an RScript via RTerm, but from within RStudio.
Write a short R script (test.R), which reads the data from disk, executes cspade() and writes the result to disk (possibly wrap this script appropriately into another function to clean the files afterwards). For testing this script should suffice
Run the script in Rscript.exe (this could be better than using RTerm.exe, see, i.e. here). This can be achieved from RStudio via the system2() function: