Hi all,

I would like to run the following from within R:

awk '{$3=$4="";gsub("  ","");print}' myfile > outfile

However, this obviously won't work:
system("awk '{$3=$4="";gsub("  ","");print}' myfile > outfile")

and this won't either:
system("awk '{$3=$4='';gsub('  ','');print}' myfile > outfile")


Can anyone help me out? I'm sure there's an obvious solution. Thanks,

Matt


-- 
Matthew C Keller
Asst. Professor of Psychology
University of Colorado at Boulder
www.matthewckeller.com

______________________________________________
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