How can I run a perl script from R with specific modules?
问题 I can run a perl script "myperlscript.pl" from Terminal without any problems. However, if I try to run the same perl script from within RStudio, it gives me the following error: command <- "myperlscript.pl outputfile.txt" system2('perl', command) Can't locate Sort/Fields.pm in @INC (you may need to install the Sort::Fields module) (@INC contains: /Library/Perl/5.28/darwin-thread-multi-2level /Library/Perl/5.28 /Network/Library/Perl/5.28/darwin-thread-multi-2level /Network/Library/Perl/5.28