I am trying to run a Java application (beagle2vcf) from R.
I tried with system() but no runs are performed only the help of the function is returned in the R console. But when I copy the same command to my cmd console the run is performed.
Then I try with system2() and only output in the console is created, but I need a file on my filesystem.
I am using the stdout parameter, but this does not seem to work.
Perhaps the fact that the Java application uses ">output" to generate files plays a role? Other Java applications that do not have this syntax to output the results run fine with system().
Example of command using system():
"java -jar beagle2vcf.jar 1 OneChrom.markers beagleTrain.bgl NA Chrom1Train.vcf"
Example system2 call:
system2(command="java",args=c("-jar","beagle2vcf.jar", j,"OneChrom.markers","beagleTrain.bgl","NA"),stdout=outnameTrainVCF,invisible=TRUE)
I run R3.5.0 on a windows 10 machine
The output should be a vcf file on my file system.