On Mon, Apr 07, 2008 at 07:42:50PM -0500, [EMAIL PROTECTED] wrote:
> Can anyone point out why this is not working?
> 
> y<-read.table(pipe('  awk '{ n = $1; sub( ".*" $1 " " ,"") ; while ( n-- )
                            ^
> print }'  temp.txt '))
         ^

one problem is that your single-quoted R string contains single quotes
which I've pointed to with "^" above. You probably intend these single
quotes to be part of the awk command line, but R can\'t know that unless
you escape them...  ;-)

In the future, can you please describe explicitly how it "is not working",
and also give a bit more context, such as a few lines of description of
the content of temp.txt, and why you're trying to use awk (rather than R
itself) to achieve whatever you're trying to achieve?

Best regards, Jan
-- 
 +- Jan T. Kim -------------------------------------------------------+
 |             email: [EMAIL PROTECTED]                               |
 |             WWW:   http://www.cmp.uea.ac.uk/people/jtk             |
 *-----=<  hierarchical systems are for files, not for humans  >=-----*

______________________________________________
R-help@r-project.org 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.

Reply via email to