Entering edit mode
Hi everyone!
I need to include Results and Reports of the System calls in Sweave pdf Report but i can't find any parameter for that in chunk parameters.
for example when i apply the code below :
> system(" makeblastdb -in mouseX.fasta -dbtype nucl -parse_seqids -out mouseXdb")
it Reports :
Building a new DB, current time: 05/01/2015 18:31:57 New DB name: mouseXdb New DB title: mouseX.fasta Sequence type: Nucleotide Keep Linkouts: T Keep MBits: T Maximum file size: 1000000000B Adding sequences from FASTA; added 1 sequences in 1.08783 seconds.
but I can't put it in Sweave Report with parameters like print, echo and or any other parameters...
as another example I want to include header of a file in my Report using System call to header command
thanks for reading
not working ! have you tried it yourself ?
I don't have the makeblastdb binary so I can't test it myself. (BTW you may want to remove the space before 'makeblastdb').
The point is that if you run a command with system(), by default the output of that command is printed to the console but not returned. If you specify the intern argument (the second argument positionally) as TRUE, it returns a character vector. So if your vignette chunk is evaluated and echoed, then you should see that character vector. Try it with a simple command (like ls, if that command exists on your system, which it should unless you are on windows).
You should refer to the help for ?system and also check out ?system2 which provides more control over executing system commands.