[R] Passing R connection as argument to a shell command on Windows

From: Anupam Tyagi <AnupTyagi_at_yahoo.com>
Date: Mon 25 Sep 2006 - 17:18:31 GMT

Hello, is there a way to pass a connection to a file in a zipped archive as argument (instead of a file name of unzipped file) to shell command "cut". In general, is it possible to pipe output of a R function to a shell command? How?

I want to do something like:

z = unz("zipArchive.zip", "fileASCII.ASC")
# open connection

# cut lines of the ASCII file in zipped archive at specific postions and send
results to another file.
shell("cut -c2-3,5-8 z > test2.dat")


R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue Sep 26 03:21:30 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 25 Sep 2006 - 18:30:08 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.