Displaying 1 result from an estimated 1 matches for "ans_filenam".
Did you mean:
ans_filename
2009 Jun 14
0
How to capture output from a subprocess?
## open a pipe
a <- pipe("mplayer -slave -quiet /media/wind/Music/a.mp3","w")
write("get_file_name",a) ## send get_file_name command to player.
## ANS_FILENAME='a.mp3'
write("quit",a) ## exit mplayer
Can I capture the output from mplayer into a R object? In this case,
it is "ANS_FILENAME='a.mp3'". I try sink(), but it doesn't work as
what I want to capture is not a return from R.
Thanks.
--
HUANG Ronggui, Wince...