Skip to content

system() not accepting strings from cat()

6 messages · ig2ar-saf1 at yahoo.co.uk, Baptiste Auguie, culpritNr1 +1 more

#
Hi again R-ists,

How do you construct a string that you can pass to system()?

For instance. Say I do
Hello!

That works. Now the alternative: I need to construct the string like this
echo Hello!

Looks nice... but see what happens when I try to use it
echo Hello! 
Error in system(command, intern) : non-empty character argument expected

I have googled extensively in and out of r-lists but I can't find a solution.

Can anybody help?
#
try
?paste


baptiste
On 10 Mar 2009, at 20:01, ig2ar-saf1 at yahoo.co.uk wrote:

            
_____________________________

Baptiste Augui?

School of Physics
University of Exeter
Stocker Road,
Exeter, Devon,
EX4 4QL, UK

Phone: +44 1392 264187

http://newton.ex.ac.uk/research/emag
#
OH! The joy!

It worked like a sharm.

Thank you.

culpritNr1
baptiste auguie-2 wrote:

  
    
#
I meant charm, not sharm!

(how embarrasing...)
culpritNr1 wrote:

  
    
#
embarrasSing, not embarrasing.

You see how I became culpritNr1?
culpritNr1 wrote:

  
    
#
On 11/03/2009, at 9:34 AM, culpritNr1 wrote:

            
If you're embarrassed by ***that*** you need to watch more Monty  
Python! :-)

	cheers,

		Rolf Turner

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}